• verseleo

    (@verseleo)


    Hello,

    How to show the custom category on the meta in the custom post types(single & archive page)?
    Indeed I will show a custom category that is created via register_taxonomy in the meta sections.

    Thanks

Viewing 3 replies - 1 through 3 (of 3 total)
  • Amit Singh

    (@apprimit)

    Hello,

    Try to install the oceanwp child theme. After that, copy the oceanwp > partials > single > meta.php file into the child theme and open it using a code editor. Now remove the condition to display it for all post types and edit it as per your need to display the custom taxonomy for your CPT. Do the same for archive pages (edit entry folder meta.php file)

    Thread Starter verseleo

    (@verseleo)

    Hi Amit,
    Thanks for the reply.

    what do you mean from this: remove the condition to display it for all post types
    Can you please elaborate more on this?

    Amit Singh

    (@apprimit)

    I mean remove the line 'post' != get_post_type() from the below code in the meta.php file – line 17-20 –

    if ( empty( $sections )
    	|| 'post' != get_post_type() ) {
    	return;
    }
Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Force CPT to show custom category (meta)’ is closed to new replies.