• I want to add AdSense to the bottom of the posts on the main page but do I add that to the Home or Index file? Also, I looked into some of the posts but none of the places I put the code worked.

    So which file shold I change and where exactly do I put it?

Viewing 12 replies - 1 through 12 (of 12 total)
  • First – what theme are you using? I haven’t seen a home.php before…

    Either way you want the adsense to display after all the posts on your main page?

    To do that you would edit “index.php”. After the call for the entry, you would place the adsense code.

    Thread Starter heather16

    (@heather16)

    I’m using blog.txt and have tried to put the code everywhere in the Index.php it seems. What exactly is the code for “the call for the entry”?

    And yes, I’d like it to display after each entry.

    Thanks!

    @heather16 – See if this little tutorial would help you: http://www.tamba2.org.uk/wordpress/adsense/

    @lalindsey – see the Template_Hierarchy page for more on home.php. It isn’t overly common, but it is a valid theme page.

    Thread Starter heather16

    (@heather16)

    Actually, I went through that tutorial before I posted 😉

    I put the code where it suggested but it doesn’t show. I don’t know what the heck is going on.

    Without a link to see that in action, we don’t know what’s going on either! *cough* hint *cough* 😉

    Thread Starter heather16

    (@heather16)

    Hee-hee…heathereagar.com

    I have it on the individual post pages now but that’s it.

    Ok, and I see it working on the individual posts fine.

    I don’t see any hint that it might be in index.php. I guess I’d suggest you hit that tutorial again, add the ads back to index.php and then post back so we can have a look.

    Try single.php

    Thread Starter heather16

    (@heather16)

    Okay, I added the code back in. See what you think!

    Oh, and the single.php isn’t the problem. Already have that 😉

    Hrmm… which file did you add the ads too? Index or Home?

    Can you give a bit of a copy/paste a bit before and abit after of where you added the ad code?

    Thread Starter heather16

    (@heather16)

    I added it to the Index page…This is just one of the many places I added it. The only place I have “sidebar” as per the tutorial is at the very bottom of the inndex.php and that didn’t work either.

    <?php the_content(‘<span class=”more-link”>Continue Reading »</span>’); ?>
    <?php link_pages(‘<p class=”paged-link”>Pages: ‘, ”, ‘number’);

    [Adsense]

    </div><!– END POST-ENTRY –>
    <p class=”post-footer”>¶ Posted

    I’m assuming that [Adsense] represents all the adsense code.

    Humor me for a minute and rename home.php to notHome.php. Head back to your site and refresh.

Viewing 12 replies - 1 through 12 (of 12 total)
  • The topic ‘AdSense – Home.php or Index.php’ is closed to new replies.