Archived topic
Display Category Custom Posttyp
3 replies · Started by Jens on August 6, 2021
Hello,
the category of custom post type isn't display.
CPT : cool_timeline / Taxonomy : ctl-stories
I added in functions.php:
add_filter( 'generate_entry_meta_post_types', function( $types ) {
$types[] = 'cool_timeline';
return $types;
} );
add_filter( 'generate_footer_meta_post_types', function( $types ) {
$types[] = 'cool_timeline';
return $types;
} );
This works fine.
Then I use the hook generate_before_entry_title:
<?php echo generate_do_post_meta_item( 'ctl-stories' ); ?>
but nothing is show. Where is the mistake ?
Hi there,
if you want to add a Custom Meta to the themes meta then you need this filter:
https://docs.generatepress.com/article/generate_header_entry_meta_items/#adding-custom-meta-items
Then you can include that in the meta display - Elvin provides an example here for adding custom meta terms:
https://generatepress.com/forums/topic/cpt-tags-are-not-showing-why/#post-1879998
Thank you very much. Also Thanks to Elvin. Your support is great.
Glad we could be of help