WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Adding adsense to front page of blog (4 posts)

  1. erikacon
    Member
    Posted 2 years ago #

    ceconn.com

    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?

  2. fher98
    Member
    Posted 2 years ago #

    Go to the theme editor, then open the index file. There you would find a comment where you can start editing.

  3. govpatel
    Member
    Posted 2 years ago #

    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.

  4. erikacon
    Member
    Posted 2 years ago #

    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.

Topic Closed

This topic has been closed to new replies.

About this Topic