Need if-else snippet for post-content on index.php
-
I would like to show ads (in javascript)in the post-content, only when it is not called in the index template. The codex mentioned
<? if (is_home())
– but says that it is deprecated now. what has replaced it?Also, I think I will run into a problem with where to place that snippet, as the post content is already in a query for
(is_search())
. Can this be done, and where would i place it?<?php if (is_search()) { the_excerpt(); } else the_content(); ?>
I have tried everything else, even making my own post-content-ad division class in css, and that has gotten teh text wrapped around the ad the way I intended. But the ads are showing up on the index.php, which is not cool! ??
thanks everyone,
Cathy
Viewing 5 replies - 1 through 5 (of 5 total)
Viewing 5 replies - 1 through 5 (of 5 total)
- The topic ‘Need if-else snippet for post-content on index.php’ is closed to new replies.