Custom post category not working
-
Hello all, thanks in advanced.
I am setting up a custom post type for a restaurant owner and have a section on the home page that pulls the most recent post under the category daily-specials. The custom post code works fine and I have the ability to check daily-specials as a category but it does not show up as the most recent daily-special post on the home page.
Here is the code I am using in my divi child them:
// custom post type function function create_posttype() { register_post_type( 'Specials', // CPT Options array( 'labels' => array( 'name' => __( 'Specials' ), 'singular_name' => __( 'Special' ) ), 'public' => true, 'has_archive' => true, 'rewrite' => array('slug' => 'daily-specials'), 'show_in_rest' => true, 'taxonomies' => array( 'category' ), ) ); } // Hooking up our function to theme setup add_action( 'init', 'create_posttype' );
What am I missing to allow these post types to be seen by the Divi blog module as the most recent daily-specials post?
Thanks.
Viewing 5 replies - 1 through 5 (of 5 total)
Viewing 5 replies - 1 through 5 (of 5 total)
- The topic ‘Custom post category not working’ is closed to new replies.