How to Place Adsense Text Ad on Carrington Mobile Theme for WordPress

In other to Place Adsense Text Ad or other Ads On Carrington Mobile Theme for WordPress, you will need to understand some basic html coding in so doing, you will be able to modify the theme by editing the codes, removing some codes and replacing them with some other codes that are required. Carrington WordPress mobile theme is one of the best themes for mobilizing a WordPress site cos of it simplicity and beautiful designs. Believe it or not, there are more visitors viewing your site from mobile than PC, so you need not to waste the revenue from your mobile visitors instead, just do simple tweaking as I did in this post to get ads showing on your mobile site so you can make more money from mobile view.

showing adsense on carrington mobile

Last time I wrote a post on Monetize Carrington Mobile With Google Adsense Search Bar which I recommend you read to get some understanding of what I will be sharing here. Don’t worry, I will wait for you till you are through, then I will continue.

So, let’s get it done…..
How To Place Adsense Text Ad On Carrington Mobile Theme for WordPress.

I believe by now you have installed the Carrington mobile plugin and WPMS theme.

Go to adsense and generate ad codes. You must have active adsense account, login to www.adsense.com and generate adsense for mobile ad codes. Choose all phones and double text only.

Login to cpanel of your site. e.g. mysite.com/cpanel

Go to Legecy File Manager or File Manager and click it.

On the next page choose wp-contents, then >>> Themes >>> Carrington Mobile >>>

Then on next page click on Header next page click header-default.php  if correctly done the url will look like this: /public_html/wp-content/themes/carrington-mobile/header/

Otherwise, repeat the above steps.

  • Now, from the right side of your screen, click >>> Edit File with Code Editor
  • Choose encoding (maybe utf-8 or there about).
  • Scroll down and >>> click edit
  • From the code contents, search for the codes below

 

if (__FILE__ == $_SERVER['SCRIPT_FILENAME']) { die(); }
if (CFCT_DEBUG) { cfct_banner(__FILE__); }

?>
DOCTYPE html PUBLIC “-//WAPFORUM//DTD XHTML Mobile 1.2//EN”
“http://www.openmobilealliance.org/tech/DTD/xhtml-mobile12.dtd”>

xmlns=”http://www.w3.org/1999/xhtml”>
<head>
    php bloginfo(‘html_type’) ?>; charset=” />
    
    <?<span class=”hiddenSpellError” pre=””>php</span> wp_title(‘«’, true, ‘right’); bloginfo(‘name’); ?>
    
    <meta name=”viewport” content=”width=320; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;”/>
    php echo get_stylesheet_uri(); ?>” type=”text/css” media=”screen” charset=”utf-8″ />
    
        @import url();
    </style>
    <script type=”text/javascript”>
    <!–
php

is_page() ? $page = ‘true’ : $page = ‘false’;
echo ‘    CFMOBI_IS_PAGE = ‘.$page.’;’;
echo ”    CFMOBI_PAGES_TAB = ‘”.str_replace(“‘”, “‘”, __(‘Pages’, ‘carrington-mobile’)).”‘;”;
echo ”    CFMOBI_POSTS_TAB = ‘”.str_replace(“‘”, “‘”, __(‘Recent Posts’, ‘carrington-mobile’)).”‘;”;

global $cfmobi_touch_browsers;
if (!isset($cfmobi_touch_browsers) || !is_array($cfmobi_touch_browsers)) {
    $cfmobi_touch_browsers = array(
        ‘iPhone’,
        ‘iPod’,
        ‘Android’,
        ‘BlackBerry9530′,
        ‘LG-TU915 Obigo’, // LG touch browser
        ‘LGE VX’,
        ‘webOS’, // Palm Pre, etc.
    );
}
if (count($cfmobi_touch_browsers)) {
    $touch = array();
    foreach ($cfmobi_touch_browsers as $browser) {
        $touch[] = str_replace(‘”‘, ‘”‘, trim($browser));
    }

?>
    var CFMOBI_TOUCH = ["php echo implode('","', $touch); ?>"];
    for (var i = 0; i < CFMOBI_TOUCH.length; i++) {
        if (navigator.userAgent.indexOf(CFMOBI_TOUCH[i]) != -1) {
            document.write(‘php echo str_replace(‘/’, ‘/’, ”); ?>’);
            break;
        }
    }
php

}

?>
    document.write(‘php

ob_start();
wp_print_scripts();
$wp_scripts = ob_get_contents();
ob_end_clean();

echo trim(str_replace(
    array(“‘”, “n”, ‘/’),
    array(“‘”, ”, ‘/’),
    $wp_scripts
));

?>’);
    //–></script>
</head>
<body<?php if(is_single() || is_page()) {echo ”;} else { echo ‘ id=”is-list”‘;} ?>>

<h1 id=”site-name”>

<hr />

<p id=”navigation-top”>
    <?php cfct_misc(‘main-nav’); ?>
</p>

Do not remove it, just scroll down to the bottom of the codes.

  • Now go back to your adsense account and copy the adsense for mobile codes that you generated earlier.
  • Come back to your cpanel file directory (…/public_html/wp-content/themes/carrington-mobile/header/) where you have found the file above and paste the adsense codes under it.
  • Now paste the adsense for mobile codes under the header codes by right click and paste from your mouse paste or Ctr+V from your keyboard.

Then save and that’s all.

Testing the mobile view of your site to make sure Adsense is showing as supposed.
Open your mobile phone browser, opera mini etc, type your site url, e.g. http://www.silvaniblog.com and wait for it to load.

As you can see on the picture above, the mobile ads is live on the Carrington mobile view of my site.

That is how I got Adsense Text Ad showing on Carrington Mobile Theme for WordPress of this blog.

Cheers!

Comments

  1. says

    bless yu for this! im usin wordpress and google denied my adsense b i manage to get the acct via youtube but still aint making money with Any help?

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Current day month ye@r *

CommentLuv badge