is_post_type seems to be deprecated and so I need to find a way to check if something is not a post type.
I thought something like this would work:
<?php if ( 'project' == post_type_exists() ) { } else { ?>
<h3>Archives</h3>
<?php wp_get_archives( 'type=monthly&limit=12' ); ?>
<?php } ?>
It does not. Any suggestions?
I tried "get_post_type()" as well and it does not work.
Try it with this:
<?php if ( post_type_exists('project') ) { } else { ?>
<h3>Archives</h3>
<?php wp_get_archives( 'type=monthly&limit=12' ); ?>
<?php } ?>
http://codex.wordpress.org/Function_Reference/post_type_exists
This seems to almost work the way I want? What I'm trying to do is have certain content show on the 'single' post type and nothing show on the 'projects' post type. It seems to recognize the existence of the 'projects' post type but it acts the same way on any page. I want to hide show content depending on the post type of the page displayed.
Nevermind, this works
<?php if ( is_singular('projects')) { } else { ?>
<h3>Archives</h3>
<?php wp_get_archives( 'type=monthly&limit=12' ); ?>
<?php } ?>