Text on Category pages
-
I’ve added text to one category via placing some code on my archives.php page. Now I need to make sure that text doesn’t show up on page 2 and following of that category. I found this code wordpress says to add, but I’m not sure where to place it or how to do this.
<?php if ( $paged < 2 ) : ?> <p>Text for first page of Category archive.</p> <?php else : ?> <p>Text for subsequent pages of Category. Can be left out.</p> <?php endif; ?>
I had tried playing with this and added the code just above the following code which allows me to add text to a specific category page:
<?php if (is_category('Category A')) : ?> <p>This is the text to describe category A</p> <?php elseif (is_category('Category B')) : ?> <p>This is the text to describe category B</p> <?php else : ?> <p>This is some generic text to describe all other category pages, I could be left blank</p> <?php endif; ?>
The only thing that happened was that the text in the first code showed up on each category page.
I hope I didn’t confuse everyone. Any help would be greatly appreciated.
Thanks,
Brian
Viewing 6 replies - 1 through 6 (of 6 total)
Viewing 6 replies - 1 through 6 (of 6 total)
- The topic ‘Text on Category pages’ is closed to new replies.