How to show what category a post is in. (1 post)

  1. easyrider
    Posted 8 years ago #

    I would like to make a special sidebar that appears only when the reader is looking at a post from a specific category.

    I can't figure out how to display the parent category id for a post.

    So I need to do do a if them statment to display they proper sidebar...

    If category 1 then display sidebar.php
    If category 2 then display sidebar2.php

    So how do I know what category a post is in and assign it to a variable?

Topic Closed

This topic has been closed to new replies.

About this Topic