php variables for custom post types and taxonomies
-
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…
global $cat;
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?
Thanks!
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘php variables for custom post types and taxonomies’ is closed to new replies.