Community Forums › Forums › Archived Forums › General Discussion › Genesis CPT Archive Settings: Not Working?
Tagged: Custom Post Type, genesis archive settings
- This topic has 1 reply, 1 voice, and was last updated 11 years ago by
Joe.
-
AuthorPosts
-
February 10, 2014 at 3:42 pm #89704
Joe
MemberI just started into this new to 2.0 feature, but I can't get it to work at all. I've even tried on a fresh local install, running just Genesis and the AgentPress theme. No other plugins.
I'm just adding in the genesis-cpt-archive-settings feature to the 'supports' array; as far as I can tell, that's all you need, right? Beyond setting has_archive and public to true.
It doesn't show up in the menu.
I thought maybe it was because I was registering my CPT in a functionality plugin, so I ripped it out out of there, dropped it straight into functions.php, and de-activated my functionality plugin. Same behavior.
I've even tried not declaring it during the initial registration, and writing a separate function to add it in.
Anyone else seen this behavior or see what I'm missing?
Here's the CPT declaration that I'm using:
// Register CPT function jra_register_directory_post_type() { $labels = array( 'name' => _x( 'Directory', 'post type general name' ), 'singular_name' => _x( 'Person', 'post type singular name' ), 'add_new' => _x( 'Add New', 'person' ), 'add_new_item' => __( 'Add New Person' ), 'edit_item' => __( 'Edit Person' ), 'new_item' => __( 'New Person' ), 'all_items' => __( 'All People' ), 'view_item' => __( 'View Person' ), 'search_items' => __( 'Search People' ), 'not_found' => __( 'No people found' ), 'not_found_in_trash' => __( 'No people found in the Trash' ), 'parent_item_colon' => '', 'menu_name' => 'Directory' ); $args = array( 'labels' => $labels, 'description' => 'All people associated with the organization.', 'public' => true, 'exclude_from_search' => false, 'publicly_queryable' => true, 'show_ui' => true, 'show_in_nav_menus' => true, 'show_in_menu' => true, 'show_in_admin_bat' => false, 'menu_position' => 10, 'menu_icon' => 'dashicons-groups', //'capability_type' => '', //'capabilities' => '', //'map_meta_cap' => false, 'hierarchical' => false, 'supports' => array( 'title', 'revisions', 'genesis-cpt-archive-settings' ), //'register_meta_box_cb' => '', //'taxonomies' = array(), 'has_archive' => true, 'rewrite' => true, 'query_var' => true, 'can_export' => true ); register_post_type( 'directory', $args ); } add_action( 'init', 'jra_register_directory_post_type' );
February 10, 2014 at 3:46 pm #89705Joe
MemberWell........
This is rather embarrassing. A very minor typo that I missed was causing the issue.The supports arg is
genesis-cpt-archives-settings
notgenesis-cpt-archive-settings
.Hopefully some part of this post helps someone in the future at least.
-
AuthorPosts
- The forum ‘General Discussion’ is closed to new topics and replies.