How to add PHP to the loop on multi- and single post pages only?
Hey -
I am using YARPP for realted posts and need to add this <?php if (function_exists('related_posts')){ ?> <?php related_posts();?> <?php }?> between the bodycontent and the footer. While I could do that in "Style and edit CENTER COLUMN", the related posts will also appear on archive pages, where I don't want them. I put that code between 'bodycopy' and 'pagination' - it works wonderfully if it were not for the archives pages. Is there a way to supress this for specific kinds of pages? |
There is a wonderful resourse at http://codex.wordpress.org/Conditional_Tags - if youvisit it you will find there is an is_archive() tag, which you can use the "!" (NOT) with so you could code
HTML Code:
<?php if (function_exists('related_posts')){ |
Thank you, juggledad. Shows I still got a long way to go to learn that PHP stuff. I expected the code in that ("Style and edit CENTER COLUMN") field to be ATA specific.
|
All times are GMT -6. The time now is 03:55 AM. |
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.