Support » Fixing WordPress » Adding adsense to front page of blog

  • Resolved erikacon


    For the life of me I can’t figure out where to put the code. I’d like it to appear above the fold. The instructions I see are all meant for HTML but WordPress is in php so what can I do? Without the familiar tags I just don’t know where to put the ads.

    I know how to get them in the sidebars because I can use widgets but I wanted them to appear in the main blog area – not below my first post but above it.

    Any ideas?

Viewing 3 replies - 1 through 3 (of 3 total)
  • Go to the theme editor, then open the index file. There you would find a comment where you can start editing.

    You can use a function and add ads where ever you want when you post using short codes you will find a article on my website on how to do add adsense along with a video.

    Before you start I recommend that you keep a back of theme functions.php just in case you make a mistake.

    Here is what worked for me. Finally. Go to Appearance, then Editor, then Index file and look for:
    <?php if (have_posts()) : while (have_posts()) : the_post(); ?>
    That, apparently, is the beginning of the loop.
    Place your Adsense ad just above it.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Adding adsense to front page of blog’ is closed to new replies.