Showing posts with label MobilePress. Show all posts
Showing posts with label MobilePress. 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.

Wednesday 29 May 2013

Adding Google Adsense Ads Into MobilePress


In past, I wrote an article about creating a mobile version of your WordPress site with MobilePress plugin. You can also earn some money with your MobilePress site by using Google Adsense or other mobile advertisement platforms, but lots of users get confused about how to add their advert code into their MobilePress template.

To be honest, it's pretty simple, but still not for first time. I'm also using Adsense on my site's mobile version at this link. Adsense mobile ads are only visible from mobile phones, not on your computer. Let's get started...

Create Adsense Mobile Ads Unit:

Your default Adsense ads are not perfect for your MobilePress powered site. You must create a mobile ads unit on your Adsense account. It's pretty simple...

  • 1. Login to your Adsense account > Click on My Ads tab
  • 2. Now in My Ads tab, click on Mobile content tab
  • 3. Now clck on New ad unit button


  • 4. Fill the following form with your ad preference and click on Save and get code:


  • 5. Copy your mobile ad code, and paste it into a blank notepad document


  • 6. Paste generated ad code into a notepad document and name it adsense.php
  • 7. Select All Files as file type
  • 8. Click on Save button to save adsense.php

The same thing goes for inmobi, buzzcity, admob and others, just copy the code to a notepad and save. Now we'll add this adsense.php file into your MobilePress theme.

Adding Ads Into MobilePress Theme:

Now you need to visit your ftp client or file manager. I'm using GoDaddy, and here is a preview of my file manager:


  • Upload this to public_html or webroot (based on your file manager)
  • Go to /public_html/wp-content/plugins/mobilepress/system/themes/default or /public_html/wp-content/mobilepress/themes/themename for custom theme.
  • Now if you want to place an advert at the top, you’ll have to edit header.php and insert the ad where you want it to display with following php:

<div class="aduity"><?php include('adsense.php'); ?></div>

  • If you need to show the ad unit at the footer, edit footer.php and paste that same code on the very first line or your preferred position..

That's it guys. Same work goes for all other mobile advert platforms. Don't ad more than three Adsense ads in your site. If you need any help, then don't forget to leave a comment.

Wednesday 1 May 2013

How To Remove MobilePress Footer Credits


In last post, I discussed about JetPack Mobile Module and MobilePress. MobilePress is a great WordPress plugin, but it has a credit note in it's footer, which is not preferred by all bloggers, including me. It's hard for beginners to remove these credits, so I'm here to help them. This is every simple, just follow these instructions:

  • Visit your hosting provides, for ex. blog is hosted on GoDaddy.
  • Login to your hosting account, and click on File Manager/FTP.

I'm not sure about yours, but my GoDaddy powered file manager looks something like this:


  • Now in your File Manager, you webroot is your home root. Now visit following root: webroot / wp-content / plugins / mobilepress / themes / default / footer.php

  • In footer.php, find and delete following line:

<p>Powered By <a href="http://wordpress.org">WordPress</a> and <a href="http://mobilepress.co.za">MobilePress</a></p>

  • Save your footer.php file, and that's it. You must admit that it was easy.

Don't forget to leave a comment :)

Monday 29 April 2013

Create A Mobile Version Of Your WordPress Blog


Recently, I migrated my WWE News blog from Blogger to WordPress, and because of that lots of WordPress tutorials are on their way.

Earlier today, I shared a tutorial about Create A Mobile Version Of Your Blogger Blog, and now it's time for WordPress users. Creating a mobile friendly site is a great idea to gain some extra views. Also, it'll be easy for your users to access a small mobile version of your site.

There are lots of ways to create a mobile version of your WordPress site, and I'll share two best of them. Both are totally free. Here we go:

By Using Jetpack:

This is a very basic thing, and you can't customize this. Jetpack is a WordPress plugin that supercharges your self-hosted WordPress site with the awesome cloud power of WordPress.com. You can install Jetpack by clicking here.

Jetpack was pre-installed on my hosting. Follow these instruction to enable mobile site powered by Jetpack:

  • Install Jetpack from your WordPress or from this link.
  • After installing, activate this plugin and visit Jetpack tab:


  • On Jetpack tab, scroll down a bit and find Mobile Theme option.


  • Click on Activate, and that's it.

Seriously, Jetpack is a great plugin but Mobile Theme by Jetpack really sucks. So I recommend you to deactivate Jetpack's Mobile Theme and use second option. However, if you're using Jetpack then your visitors by mobile will see a simple mobile version of your site.

By Using MobilePress:

MobilePress is a plugin for WordPress that renders a mobile friendly version of your WordPress website or blog. It allows for custom themes and a few other mobile friendly settings. You can install MobilePress by clicking here. Preview of this tutorial is also a MobilePress site. Here is how to use MobilePress:

  • Install MobilePress from your WordPress or from this link.
  • Activate MobilePress plugin, and that's it.

You can easily view your mobile theme in a web browser by visiting http://www.yoursite.com/?mobile.

Remember, to view your normal blog theme again, simply visit http://www.yoursite.com/?nomobile.

That's it for this time. In future, I'll discuss more about MobilePress and Jetpack.

Popular Posts

 
Powered by Blogger.