WordPress.org

Ready to get started?Download WordPress

Forums

Ads between pots-editing index.php doesn't work for main page (2 posts)

  1. ayman07
    Member
    Posted 3 years ago #

    hey everyone. i know this question has been asked several times. im using the "source" theme and my issue is I can not get the ads to display between the posts. i have already searched forums and i have tried some of the suggestion solutions with no luck. the code i am using is this:

    <?php $count = 4; ?>
    <?php while (have_posts()) : the_post(); ?>
    <?php include(TEMPLATEPATH . '/includes/entry.php'); ?>
    google adsense code here
    //-->

    and i am injecting this in the index.php right above the "endwhile" code. what this does is display ads between my posts but only when someone clicks a certain category. for example, the ads will NOT display on the main page but if you click the tag for something like "review" and it will show you all the posts for under the category "review" and you will see the ads in between the posts. this is nice...but not what i want. i want it right on the first page as well. i searched the single.php and even went to the style.css and couldnt find a place to put the code. any help would be greatly appreciated!

  2. alchymyth
    Forum Moderator
    Posted 3 years ago #

    help with a commercial theme could be difficult, as there is no free access to ghe theme templates.

    try to get support at the theme vendor's site http://www.elegantthemes.com/forum/

    general:

    if you look int the template hierarchy, the front page might be generated by a different template other than index.php
    http://codex.wordpress.org/Template_Hierarchy

Topic Closed

This topic has been closed to new replies.

About this Topic