I registered a custom post type ("movie") with tags and categories. Now, I'm able to filter and search for the custom post with these tags and categories, so I know they're present and working, but they're not showing up on the custom posts.
This is the code for the meta data to show up.
<?php
if( !myThemes::get( 'show-bottom-meta' ) ){
return;
}
if( is_singular( 'post' ) && ( has_category( ) || has_tag() ) ){
?>
<div class="post-meta-terms">
<?php
if( is_singular( 'post' ) && has_category( ) ){
echo '<div class="post-meta-categories">';
echo '<strong><i class="icon-list"></i> ' . __( 'Categories' , 'myThemes' ) . '</strong>: ';
the_category( ' ' );
echo '</div>';
}
if( is_singular( 'post' ) && has_tag() ){
echo '<div class="post-meta-tags">';
echo '<strong><i class="icon-tags"></i> ' . __( 'Post Tags' , 'myThemes' ) . '</strong>: ';
the_tags( ' ' , ' ' , ' ' );
echo '</div>';
}
?>
</div>
<?php
}
?>
This has only "post" so I added "movies" to make it show the meta data for movies as well, like this:
<?php
if( !myThemes::get( 'show-bottom-meta' ) ){
return;
}
if( is_singular( 'post', 'movie' ) && ( has_category( ) || has_tag() ) ){
?>
<div class="post-meta-terms">
<?php
if( is_singular( 'post', 'movie' ) && has_category( ) ){
echo '<div class="post-meta-categories">';
echo '<strong><i class="icon-list"></i> ' . __( 'Categories' , 'myThemes' ) . '</strong>: ';
the_category( ' ' );
echo '</div>';
}
if( is_singular( 'post', 'movie' ) && has_tag() ){
echo '<div class="post-meta-tags">';
echo '<strong><i class="icon-tags"></i> ' . __( 'Post Tags' , 'myThemes' ) . '</strong>: ';
the_tags( ' ' , ' ' , ' ' );
echo '</div>';
}
?>
</div>
<?php
}
?>
But it isn't working. I checked this post (link) but it looks like they follow the same logic, so I'm not sure what's wrong here.
Any help greatly appreciated. Thanks!