This website uses cookies to personalize your experience. By using this website you agree to our cookie policy.

CPT don’t show up on options for table index

Home Forums Product Support Forums Ajax Search Pro for WordPress Support CPT don’t show up on options for table index

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #57626
    verlag_woAGverlag_woAG
    Participant

    First of all: i like “ajax search” very much! but there seems to be a problem:

    Custom Post Types don’t show up when I want to put them into the table index:
    “Post types – Select which post types to include in the search index.”

    They do on the “main settings”

    Search in custom_post_types : Available post types

    I registered the custom_post_types via a selfmade plugin. I did the same with the custom-taxonomies, they show up for “table index”, so i wonder why the CPT don’t. Any Idea?

    Greetings

    Michael

    #57627
    Ernest MarcinkoErnest Marcinko
    Keymaster

    Hi Michael,

    Thank you very much for your kind words, I really appreciate them!

    If you registered the post types programmatically, then the most likely cause is that they might not be allowed in the Rest API, so wordpress doesn’t return them for the new UI.
    Adding the show_in_rest argument to the post type registration should resolve it:

    'show_in_rest' => true

    All you need to do is add this argument to the register_post_type function arguments and that should resolve it.

    All the best,
    Ernest

    #57631
    verlag_woAGverlag_woAG
    Participant

    Great! Thank you very much, this did it!

    #57632
    Ernest MarcinkoErnest Marcinko
    Keymaster

    You are very welcome!

    I have noted this as an issue, in tomorrow’s plugin update there will be a core fix for it, so even if show_in_rest is not defined or set to false, the plugin will display the post type in the list correctly.

    If you don’t mind, I will close this topic soon and mark it as resolved, feel free to open another one if you have other questions or issues.

    If you like the plugin and have not rated already, feel free to leave a rating on the wordpress plugin repository, it’s greatly appreciated and helps us a lot!

    All the best to you,
    Ernest

Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.