Hi. I want to edit my theme to display a sidebar only when viewing a specific custom post type or a specific custom taxonomy. The theme author told me how to do it with a regular category. Like this…
if ( $cat == ’63’) $category_columns = ‘1 Column + Sidebar’;
63 is the category id in this case. However, this does not work when I try to use the id from a custom taxonomy.
What should I replace $cat with to make this work?
- The topic ‘php variables for custom post types and taxonomies’ is closed to new replies.