• Resolved sclosson

    (@sclosson)


    Hello, first time using this plugin and just wanted to say, it’s amazing, however, I don’t see any easy way to add custom post types to the Sidebar Replacement section of the Backend. Would love to get sidebar replacements working for a Custom Post Type that I created called, “service”. Are their any hooks in this plugin that allow for this? I believe it might have been working before implementing the rest api, but doesn’t seem to be picking up any custom post types now. Says that it is suppose to support Custom Post types. I registered the Custom Post Type called, “service” in the wordpress ‘init’ hook. Could that be why it’s not picking it up? Maybe a priority on this hook is needed?

    Thank you and great job on this plugin.

    • This topic was modified 3 years, 11 months ago by sclosson.
Viewing 3 replies - 1 through 3 (of 3 total)
  • Thread Starter sclosson

    (@sclosson)

    Awwww, nevermind, looks like you need to enable rest api for these custom post types in order for them to show up in the Sidebar Replacements area. Just added the following to the register_post_type args array:

    'show_in_rest' => true,

    Not sure if there is a security risk with allowing this, but now it is working perfectly.

    THANKS for an AMAZING PLUGIN!

    • This reply was modified 3 years, 11 months ago by sclosson.
    Plugin Author Sunny Johal

    (@sunny_johal)

    Hi @sclosson,
    I’m glad you have managed to solve your issue. There isn’t a security risk with enabling your post type with the REST API because it isn’t private (so I wouldn’t worry about that).

    If you could leave a review on the plugin that would be much appreciated. Thanks

    Hi,

    I have WordPress 5.6 and installed Easy Custom Sidebars however I cannot get the custom sidebars to show. Looking at someone else’s post they were able to get the sidebars to show by Just adding the following to the register_post_type args array: ‘show_in_rest’ => true,

    Can you tell me if this is correct, also how do you add ‘show_in_rest’ => true, in WordPress?

    Any assistance will help

    Thank you

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Custom Post Types not available’ is closed to new replies.