View Single Post
Old 02-22-2009, 10:04 AM  
fris
Too lazy to set a custom title
 
fris's Avatar
 
Industry Role:
Join Date: Aug 2002
Posts: 55,491
Quote:
Originally Posted by Angry Jew Cat View Post
exactly. it's not really anything i have any particular use for atthe moment, just curious while we're somewhat on topic if it's doable also? to say have a seperate banner on the index, page/1/, page/2/ and so forth. i know you could just stick a rotator in there, i'm speaking theoretically if you wanted to do this.
this is a way to do it

add this to functions.php

Code:
function do_pageads() {
        global $paged;
        if(!$paged) include (TEMPLATEPATH . '/front_ads.php');
        else include (TEMPLATEPATH . '/other_ads.php');
}
sample index.php

Code:
<?php get_header(); ?>

<div id="content" class="narrowcolumn">

<?php if (have_posts()) : ?>
<?php $count = 0; ?>
<?php while (have_posts()) : the_post(); ?>

<?php $count++; ?>

<div class="entry">
<?php the_content(); ?>
</div>

<?php if ($count == 2) : ?>
<?php do_pageads(); ?>
<?php endif; ?>

<?php endwhile; ?>

<?php endif; ?>

</div>

<?php get_sidebar(); ?>

<?php get_footer(); ?>
this will add your page ad after every 1st post on each page, calling the frontpage_ads or other_ads, add as many as you want.
__________________
Since 1999: 69 Adult Industry awards for Best Hosting Company and professional excellence.


My Cam Feeds Script
fris is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote