Viewing 13 replies - 1 through 13 (of 13 total)
  • Plugin Author Zack Grossbart

    (@zgrossbart)

    What are CPTs?

    Moderator Ipstenu (Mika Epstein)

    (@ipstenu)

    ?????? Advisor and Activist

    Custom Post Types.

    Plugin Author Zack Grossbart

    (@zgrossbart)

    We show a separate calendar for each custom post type. You don’t need to do anything to exclude them.

    Moderator Ipstenu (Mika Epstein)

    (@ipstenu)

    ?????? Advisor and Activist

    I don’t want the calendar at ALL for my custom post types, is the point ?? I don’t need it for them.

    You know how you omit pages from having a calendar? Like that. Is there a filter or something I can hook into to say “And no calendar for this post type”?

    Plugin Author Zack Grossbart

    (@zgrossbart)

    We don’t have a filter to hide that option. You could hide that menu option with CSS.

    Moderator Ipstenu (Mika Epstein)

    (@ipstenu)

    ?????? Advisor and Activist

    Speaking as a forum mod, please don’t sign your posts. It’s actually against the guidelines ??

    And speaking as a user, it would be nice if there was a filter to hide the calendar for post types where they’re unnecessary. Consider that a feature request please and thank you.

    Plugin Author Zack Grossbart

    (@zgrossbart)

    Thank you for the feature request and the forum review.

    What would you want that feature to look like? Would it be something you would set with code or something in the UI? Are there other plugins that do something similar? I’d like to follow a common pattern if there is one.

    Well, we would just want a settings page, to have the possibility to switch on/off support for various custom post types. With posts as default, it is fine, but I don’t want it for (as an example) the custom post types books or authors. Since there is no real planning for those posts, I would not like to have a calendar there. Not for every other postype than posts, it show the calendar.

    Is it clear what this request is about?

    Peter Luit
    Netherlands

    • This reply was modified 6 years, 4 months ago by Peter Luit.
    Plugin Author Zack Grossbart

    (@zgrossbart)

    Thank you Peter. That is clear. I’ll need to think about that. It’s a major change to the way the calendar works now and won’t be something we can do soon.

    +1 to this feature request.

    Ummm…. actually, it looks like you do have a filter to exclude custom post types. ??

    Just add this to your functions.php

    // Suppress the editorial calendar for a custom post type. 
    add_filter('edcal_show_calendar_{your-post-type}', function() { return false; });

    You can see the filter is applied in line 124 of edcal.php

    Moderator Ipstenu (Mika Epstein)

    (@ipstenu)

    ?????? Advisor and Activist

    [removed – after the code above was fixed, it worked]

    Thank you @stjaymz, that worked perfectly for me. I am now filtering out five custom post types that I don’t want the calendar feature for.

    I would also very much like a settings page that simply listed all the custom post types with checkboxes next to them so you can easily enable/disable where it shows up. I’ve seen many plugins do this already. ??

Viewing 13 replies - 1 through 13 (of 13 total)
  • The topic ‘Can I exclude CPTs?’ is closed to new replies.