Showing posts with label Jetpack. Show all posts
Showing posts with label Jetpack. Show all posts

Tuesday 3 December 2013

How To Enable Jetpack Stats On MobilePress

Almost every WordPress admins uses WordPress' Jetpack plugin on their site to connect and use WordPress.com feature on their self-hosted WordPress. There are a lot of great modules in the Jetpack plugin, but Jetpack Stats module is my personal favorite.

MobilePress is also a well known plugin to create a mobile friendly version of your WordPress. It allows custom themes and a few other mobile friendly settings. But Jetpack's stats module only tracks the desktop version of your site, not the MobilePress version.

Don't worry about this, as I have found a way to enable Jetpack's stats module on our MobilePress. Here is how:

  • First of all, enable Jetpack stats module on your WordPress. Now visit your WordPress website as a guest (without signing in).
  • Now right click & click on View Page Source to view the source code of your current page, and search stats.wordpress.com in the source code page. You'll find a code similar to this:

<script src="http://stats.wordpress.com/e-201349.js" type="text/javascript"></script>
<script type="text/javascript">
st_go({v:'ext',j:'1:2.6',blog:'YOURUNIQUEBLOGID',post:'0',tz:'-5'});
var load_cmc = function(){linktracker_init(YOURUNIQUEBLOGID,0,2);};
if ( typeof addLoadEvent != 'undefined' ) addLoadEvent(load_cmc);
else load_cmc();
</script>

  • Copy your unique blog id from your unique Jetpack stats snippet and place it in the following code:

<script src="http://stats.wordpress.com/e-201341.js" type="text/javascript"></script><script type="text/javascript">
st_go({v:'ext',j:'1:2.5',blog:'YOURUNIQUEBLOGID',post:'<?php the_ID(); ?> ',tz:'-4'});
var load_cmc = function(){linktracker_init(YOURUNIQUEBLOGID,0,2);};
if ( typeof addLoadEvent != 'undefined' ) addLoadEvent(load_cmc);
else load_cmc();
</script>

  • Now paste the above code in the footer.php (webroot / wp-content / plugins / mobilepress / themes / default / footer.php) file of your current MobilePress theme. That's IT!!

As you can see, there's only one difference in the above two codes. In the second code, I have replaced the current post id with <?php the_ID(); ?>, otherwise your Jetpack wouldn't count views for specific page, and all your visits would be counted as Homepage views or of a specific post.

Sunday 13 October 2013

How To Remove Footer Credits From Jetpack Mobile Theme In WordPress


Jetpack is a great plugin for WordPress to connect your blog to WordPress.com. It also gives us dozens of crappy great plugins for our blog, such as mobile module, social share, wp.me short links, and more.

Jetpack's Mobile module is great plugin to create a mobile version of your website for mobile users, but it comes with a footer credit: Proudly powered by WordPress.

Giving WordPress their credit for their hard work is not bad, but if you're interested then you can easily remove the Jetpack.

In your file manager, edit footer.php file which can be found inside public_html/wp-content/plugins/jetpack/modules/minileven/theme/pub/minileven

Just remove this code from line #27:

<a href="<?php echo esc_url( __( 'http://wordpress.org/', 'jetpack' ) ); ?>" title="<?php esc_attr_e( 'Semantic Personal Publishing Platform', 'minileven' , 'jetpack'); ?>" rel="generator"><?php printf( __( 'Proudly powered by %s', 'minileven' , 'jetpack'), 'WordPress' ); ?></a>

That's it.

Saturday 4 May 2013

Deactivating Jetpack's Mobile Theme In WordPress


Last week, I posted an article about Jetpack's Mobile Theme module, which is the easiest way to create a mobile version of your WordPress blog.

Deactivating Jetpack's services is a very simple task, but I for the first time, I was lost in that module page. It's quite easy. You can check it below:

Visit your WordPress blog's Jetpack plugin and scroll down to Mobile Theme module. Just like below


As you can see in above image, Mobile Theme is already activated in my press. Now to deactivate this theme, click on Learn More button, and it'll look something like this:


Well done.Now as you can see in above image, a Deactivate button is now visible. Click on that Deactivate button to deactivate Mobile Theme. That's it.

Also, I'm trying to customize this mobile theme, and will post some tutorials soon.

Popular Posts

 
Powered by Blogger.