• Resolved Alison

    (@zirafa)


    I’m going to be using Events Manager for my site’s calendar, including the Recurring Events feature. I need to be able to define a Default Sidebar for each recurring event series, but the metabox isn’t showing up. It does show up for individual event instances of the recurring event, but not for the post which defines the series. Both “Event” and “Recurring Event” are custom post types defined by the Events Manager plugin.

    How can I enable the metabox for a specific custom post type if it isn’t showing up as expected?

    Thanks in advance for your help!

Viewing 2 replies - 1 through 2 (of 2 total)
  • Hi @zirafa

    I hope you’re well today!

    I’ve installed the plugin on my own site to test it and yes, there’s no metabox for custom sidebars there.

    So I did a little “digging” into the source code of Events Manager and the post type for recurring event is set not to be public. This means that by design it wasn’t meant by plugin developers to be used on front-end. Custom Sidebars doesn’t add its metabox to non-public posts as there’s no point in assigning sidebars to them (because they are not visible to end-users).

    Fortunately though, Events Manager developers made it easy for us to change and provided nice filter so this can be changed. If you add this code to your theme’s (preferably a child theme) “functions.php” file

    add_filter( 'em_cp_event_recurring_public', '__return_true' );

    it will make Recurring Event post type public and the meta box will show up there so if you already have a way to display that post on front-end (instead of it redirecting to the nearest upcoming individual instance of event) it will work as long as page template calls sidebar.

    Best regards,
    Adam

    Hello @zirafa

    I hope you are doing well!

    We haven’t heard back from you for a while now so we’ve marked this ticket as resolved. If you do have any followup questions or require further assistance feel free to reopen it and let us know here.

    Kind regards,
    Nastia

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Default Sidebar metabox missing from custom post type’ is closed to new replies.