Need on custom type post not being editable

[ad_1]

I have to come into a custom theme that is 5 years old, and it has a careers page. But the post cannot be edited. I have been looking through the theme files where the post type is registered to see if it’s a permission issue, but everything seems good. I am not a WordPress developer, and any ideas would be helpful.

I am adding an image of what the display page looks like. The posts are created and deleted through an action that would call an API to check if there are changes and either create, delete, or update the post, and from that point, it works. It’s from the admin UI that it doesn’t.

​

register_post_type( ‘crb_career’, array(
‘labels’ => array(
‘name’ => __( ‘Careers’, ‘crb’ ),
‘singular_name’ => __( ‘Career’, ‘crb’ ),
‘add_new’ => __( ‘Add New’, ‘crb’ ),
‘add_new_item’ => __( ‘Add new Career’, ‘crb’ ),
‘view_item’ => __( ‘View Career’, ‘crb’ ),
‘edit_item’ => __( ‘Edit Career’, ‘crb’ ),
‘new_item’ => __( ‘New Career’, ‘crb’ ),
‘view_item’ => __( ‘View Career’, ‘crb’ ),
‘search_items’ => __( ‘Search Careers’, ‘crb’ ),
‘not_found’ => __( ‘No Careers found’, ‘crb’ ),
‘not_found_in_trash’ => __( ‘No Careers found in trash’, ‘crb’ ),
),
‘public’ => true,
‘exclude_from_search’ => true,
‘show_ui’ => true,
‘capability_type’ => ‘post’,
‘capabilities’ => array(
‘create_posts’ => true,
‘read_posts’ => true,
‘edit_posts’ => true,
‘delete_posts’ => true,
),
‘hierarchical’ => false,
‘_edit_link’ => ‘post.php?post=%d’,
‘rewrite’ => array(
‘slug’ => ‘career’,
‘with_front’ => false,
),
‘query_var’ => true,
‘menu_icon’ => ‘dashicons-groups’,
‘supports’ => array( ‘title’, ‘editor’, ‘page-attributes’, ‘thumbnail’ ),
) );

[ad_2]
2 Comments
  1. Is it possible the edit link is just hidden? Can you edit the posts by manually entering the edit URL?

  2. Try `edit_post` singular? [https://developer.wordpress.org/reference/functions/register_post_type/#capabilities])

    Just remove all the capabilities stuff if you’re setting everything to `true`, which is the default anyway.

 

This site will teach you how to build a WordPress website for beginners. We will cover everything from installing WordPress to adding pages, posts, and images to your site. You will learn how to customize your site with themes and plugins, as well as how to market your site online.

Buy WordPress Transfer