Hello everybody, this is my first post and I am a almost complete noob. So, don’t be too harsh on me :). The question:
I have a part of code in the theme I’m using and it is located in the archive.php file. It goes like:
<p class="sample"><?php the_content_rss('', TRUE, '', 33); ?> <a class="continue" href="<?php the_permalink() ?>">Continue »</a></p>
This is all ok and I understand what this does (basically, displays a text part of a post in a post listing and a link to the post itself, as much as I can define it). But, I have a specific situation where a content of a post is some code which cannot be hidden (it is a call for a wp-table-reloaded plugin table) and I don’t want that [table id=10 /] to be displayed next to the post title in the listing because it just looks stupid and out of place. I have tried using conditional tags to implement an IF before that code above with an is_single(‘X’) to not display anything, and ELSE to display code as normal. I have tried every possible format known to me and failed. Can anyone please just type the code for a possible solution for this problem. I hope you are clear on what I want to accomplish. Thank you in advance.
p.s. I managed to find and implement something like this, doesn’t give errors but still displays the post text and i’we checked for the correct page id (i don’t understand the syntax of this type of command entirely yet):
<?php if (is_single('X')) : ?> <?php else : ?> <p class="sample"><?php the_content_rss('', TRUE, '', 33); ?> <a class="continue" href="<?php the_permalink() ?>">Continue »</a></p> <?php endif; ?>
- The topic ‘is_single (another problem)’ is closed to new replies.