Skip to content

Instantly share code, notes, and snippets.

@jayseventwo
Created April 24, 2013 03:49
Show Gist options
  • Save jayseventwo/5449478 to your computer and use it in GitHub Desktop.
Save jayseventwo/5449478 to your computer and use it in GitHub Desktop.
Show/hide certain page elements depending on category (useful for custom post types).
<?php if ( 'portfolio' == get_post_type() ) { ?>
portfolio
<?php } else { ?>
blog
<?php } ?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment