WordPress.org

Support

Support » How-To and Troubleshooting » How to add ads on front page and category?

How to add ads on front page and category?

Viewing 3 replies - 1 through 3 (of 3 total)
  • colorvila
    Member

    @colorvila

    You need to edit your theme to achieve this.
    I think the flexible solution is:
    1.Add a filter at the front page where you want to show your ADS.
    2.Insert any things you want in the filter.(Certainly can be your ADS.)

    Michael
    Forum Moderator

    @alchymyth

    search the ad (adsense) plugins http://wordpress.org/extend/plugins/ – some of them might be able to do what you want.

    Bojan Denic
    Participant

    @evilmc

    I change main index template and category:

    <?php if (have_posts()) : ?>
    <?php while (have_posts()) : the_post(); ?>

    Replace with:

    <?php if (have_posts()) : $i=0; ?>
    <?php while (have_posts()) : the_post(); ?>
    <?php if($i++==3) : ?>
    YOUR CODE HERE
    <?php endif; ?>

    <?php if($i==6) : ?>
    YOUR CODE HERE
    <?php endif; ?>

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘How to add ads on front page and category?’ is closed to new replies.