• mreider

    (@mreider)


    Hey all,

    I want to show some html on the first page of a particular categories archive.

    I’ve tried using
    <?php if ( in_category(‘3’) ): ?>
    Hello
    <?php endif; ?>

    Which works, but as I said I only want the code to appear on the first page of that category archive.

    Any ideas how I can do this?

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter mreider

    (@mreider)

    Got it – I just grabbed the URL and did an if statement. ??

    Can you post the code you used? I’m trying to do something similar on my site (show certain code only on the first and last pages of a category archive). Thanks!

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Show some code based on category page’ is closed to new replies.