Post meta not showing up on frontend with custom post types.


Hi

I am using the plugin https://wordpress.org/plugins/custom-post-type-ui/ and have created two custom post types and taxonomy for categories and tags.

When I go to the archive page of each of them I see the featured image, a title and then the content. No post meta is seen. How do I get the post meta to show up on the blog archive pages of the custom posts?

Thanks!


Hello @paal, In functions.php, add this code to prevent Beans from removing post meta in CPT by default:

add_filter( 'beans_pre_post_meta', 'yourthemerpefix_keep_post_meta' );

function yourthemerpefix_keep_post_meta( $pre ) {

    // Don't short-circuit for 'YOURCUSTOMPOSTTYPE' post type.
    if ( 'YOURCUSTOMPOSTTYPE' === get_post_type() ) {
        return false;
    }

    return $pre;

}


Hello Mathieu and others

https://webkonsulenten.com/nyheter/ The default blog page shows the default post meta: Date, author, add a comment as well as the default Category and tags.

A custom post type archive page looks like this: https://webkonsulenten.com/nettmagasin-arkiv/ Post meta shows: Date, author and add a comment. It does not show the (CPTui plugin) CPT taxonomies category (ies) or Tags.

How do I show the CPT category and tags on the CPT archive as well as other CPT pages?

I am working on a Beans tutorial on how to use Custom Post Types with Beans. While I am also working on a religious Norwegian news site that uses two different CPT's

Write a reply

Login or register to write a reply, it's free!