Hi, I'm trying to edit my wordpress template (the index.php file) so that I can display an advertisement in between the first and second post. At the moment the advert is stuck just before the first post. Here is my code (with the advert in bold): Any idea how to move the advert so that it is displayed below the first post? Or perhaps at the end of the last post on the page? Thanks
Instead editing files... use this simple plugin to make it easier www.wordpress.org/extend/plugins/all-in-one-adsense-and-ypn/
or you can use my plugin -> http://wordpress.org/extend/plugins/slayers-ad-integration/ for a full feature list check out http://www.thaslayer.com/2008/08/10/wordpress-plugin-slayers-ad-integration-v-10/ cheers, Tom
To move to the end, revise your index.php to have the getad function follow the block of if/else code: <?php if($tn_mz_blog_style == TRUE){ ?> <?php include (TEMPLATEPATH . '/layouts/' .$tn_mz_blog_style. '.php'); ?> <?php } else { ?> <?php include (TEMPLATEPATH . 'layouts/mzine.php'); ?> <?php } ?> <?php echo getad('banner')?> Code (markup): To have it follow the first post only, will need to see layouts/mzine.php file I think. Not sure what the test is for ($tn_mz_blog_style) and what sets it, possible this file is served instead of mzine.php