Support » Fixing WordPress » Showing categories just for a certain page.

  • To make things short… my problem is that I want certain categories to show up for a certain page and not for all.

    My site contains these pages: Home, articles, about, contact
    Now the About, contact and the home page are static, articles not and therefor I have a couple of categories under them. I want them to show up just for ARTICLES, how do I do that?

    Thanks a million, a gazillion!

Viewing 1 replies (of 1 total)
  • you need to create a template for articles page.

    Copy the contents page.php from your current theme and create a new file page-articles.php with these contents.

    artilces is the slug for your articles page. you can also replace it with page id like this page-10.php

    in page-articles.php before or after the post content paste this code where you want categories to be displayed. I assume that you want comma separated categories below each article or may be after the article title:

    <?php echo get_the_category_list(', ',' '); ?>

Viewing 1 replies (of 1 total)
  • The topic ‘Showing categories just for a certain page.’ is closed to new replies.