• Resolved 1ramyt

    (@1ramyt)


    Hello,

    As the title states, some of the custom post types that were created for a site I’m working on (started before I did) are not showing up in the page editor block dropdown options. For example, on the left pane of the dashboard, I can see these pinned posts types: “Post Custom 1”, “Post Custom 2”, “Post Custom 3” … however, when I’m creating a new page, in the Block options dropdown for the post type, it only shows the default types and “Post Custom 2” … not the other ones.

    It seems that “Post Custom 1” and “Post Custom 3” were created with custom php; not certain on that, but they weren’t created with CPT UI. Why? I have no idea.

    Is it possible to use CPT UI to enable the post to show up in the block editor post types dropdown? I need this in order to show these types of posts in my query loop.

    I’ve watched and read videos and documentation for the past few hours, but I haven’t found a solution yet (if there even is one for my situation). I’m fairly new to WP, and crash-course learning on the job, so any help would be greatly appreciated.

    Thank you in advance!

    Thank you.

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Contributor Michael Beckwith

    (@tw2113)

    The BenchPresser

    If you’re all uptodate with the latest versions of CPTUI, you should also have “Show In REST” based fields for each post type listing. By default, we set those to true with NEW post types, and it’s not true by default when no value is set. So any post types that existed in CPTUI before we added those REST fields would be falling back to false. I would check and update each post type in question and set “Show In REST” to true for each. Same thing for any custom taxonomies as well, as those have the same options available and the same WP core default of false but CPTUI default of true.

    Hope that helps.

    Thread Starter 1ramyt

    (@1ramyt)

    @tw2113 Thank you so much for this information. Yes, the site is updated with the current version. I’ll give this a go this weekend.

    This should work for a post that was created out of CPTUI, correct? I found out today that the posts that things are not working “correctly” for were created years ago before the previous admin (so two teams ago) installed CPTUI; it seems those were custom coded.

    Anyway, I’ll test your suggestion out anyway and report back.

    Cheers!

    Plugin Contributor Michael Beckwith

    (@tw2113)

    The BenchPresser

    The one setting change, of setting “Show in REST” to true, should help all the posts in that post type, yes. No need to edit a bunch of individual posts and do something to them. Just change this registration parameter

    … ‘publicly_queryable’ must also be set to true.

    So ‘Show in REST‘ and ‘Publicly Queryable‘ both must be set to true.

    • This reply was modified 2 years, 8 months ago by cvladan.
    Plugin Contributor Michael Beckwith

    (@tw2113)

    The BenchPresser

    I believe so, yes @cvladan

    Is that much not working for you at the moment?

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Custom Post Type Not Showing in Block Editor Drop Down Menu’ is closed to new replies.