- This topic has 5 replies, 2 voices, and was last updated 6 years, 12 months ago by .
- The forum ‘General Discussion’ is closed to new topics and replies.
These forums are for general discussion on WordPress and Genesis. Official support for StudioPress themes is offered exclusively at My StudioPress. Responses in this forum are not guaranteed. Please note that this forum will require a new username, separate from the one used for My.StudioPress.
add_filter( 'genesis_post_meta', 'sp_post_meta_filter' );
Something like this above doesn't seem to work for custom post type posts/entries - is there another filter that I could use for a CPT entry?
Thanks in advance for your input.
If you want the genesis_post_meta filter to work with CPTs, you have to inlcude
add_post_type_support( 'cpt', 'genesis-entry-meta-after-content' ) somewhere during the init process. Change 'cpt' to the slug o your post type.
As a first step, the genesis_post_meta filter uses the WordPress post_type_supports function to test for this support attribute. If it doesn't exist, the filter doesn't do anything. https://codex.wordpress.org/Function_Reference/post_type_supports
Thank you Victor - unfortunately, it doesn't make a difference - still don't see the post-meta info on the CPT single view page.
the post meta shows below the posts but not below the single entries of the custom post type???
add_filter( 'genesis_post_meta', 'sp_post_meta_filter' ); does not get processed when I'm on a single view page of a CPT that uses the standard template like the posts do - on the post page, the filter gets processed.
what am I missing here?
Thank you in advance for your input.
© 2023 WPEngine, Inc.