WordPress.org

Ready to get started?Download WordPress

Forums

Restrict Categories
Support for custom post types and custom taxonomies (terms) (11 posts)

  1. Jelke Boonstra
    Member
    Posted 1 year ago #

    @Matthew Muro,

    In the near past there have bin some questions regarding support for custom taxonomies and terms support.

    Will this feature get included in te near future? I ask this question, because i couldn't find a clear plugin author answer regarding this feature.

    Thanks in advance.

    http://wordpress.org/extend/plugins/restrict-categories/

  2. thirdone
    Member
    Posted 11 months ago #

    I have also just asked about this. Can we please get an answer on this?

  3. Atlanta
    Member
    Posted 11 months ago #

    +1
    Interested in how to do this also

  4. harveyharveyharvey
    Member
    Posted 9 months ago #

    +1
    and me!

  5. Piet
    Member
    Posted 9 months ago #

    +1 me too and preferably the possibility to restrict multiple taxonomies.

    As an example I would like to restrict a certain category from a certain user as well as a certain custom taxonomy.

  6. samedgecombe
    Member
    Posted 8 months ago #

    +1 for this one too...

  7. Kurisutian
    Member
    Posted 8 months ago #

    +1

    I'm also searching for a way to use this plugin with custom post types

  8. Kenan
    Member
    Posted 7 months ago #

    +1.
    Thanks

  9. revmitcz
    Member
    Posted 7 months ago #

    I found the solution in another post, so I'll share it here..

    in restrict-categories.php, line 39 says :
    if ( $post_type == false || $post_type == 'post' )

    Just add your custom post type(s) :
    if ( $post_type == false || $post_type == 'post' || $post_type == 'my-custom-post' )

    Voila. The original thread I found was here :
    http://wordpress.org/support/topic/extension-of-restrict-categories-plugin-to-cover-pages?replies=9#post-2269635

    But his suggested code didn't work for me, despite looking perfectly okay in theory :
    if ( $post_type == false || $post_type == 'post' || in_array($post_type, array('my_custom_type_1', 'my_custom_type_2')) ) {

    So, uh.. there ya go. It's a temp fix for now.

  10. marco.marenco
    Member
    Posted 7 months ago #

    hi revmitcz,
    i've tried your solution but it doesn't work for me.
    i'm new to WP so i0ve only basic info:
    my_custom_type_1 and _2 are the right string to write? or are they example string?

    maybe someone need the same upgrade.

    i use event manager plugin:
    http://wordpress.org/plugins/events-manager/

    i would restrictd the categories created with this plugin to a user.
    this categories are custom taxonimies for wp.

  11. asterbird
    Member
    Posted 4 months ago #

    Thanks, remitcz! Your solution was perfect for I needed. Too bad the plugin author doesn't add this in.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.