Membership and Custom Taxonomy

Encountered an issue with Membership Pro and custom taxonomies...while custom post types seem to fall into a positive type by default, taxonomies fall into the negative. Not sure how since neither show up in the DB... but that's why I'm here.

I did come across a post of a similar nature here:

https://premium.wpmudev.org/forums/topic/membership-plugin-missing-support-for-custom-post-types

However, while it explains a fair bit it is a little bit cryptic when it comes to adding Taxonomies to Level administration. Ultimately I would be happy to just give my taxonomy a positive rule and get this project out of the way.

Anyone have a thought?

  • notabledesign

    I managed to hack the show_noaccess_page function in membershippublic.php to circumvent any rules affecting my taxonomies by checking the query vars in $wp_query for my taxonomy name. If found, it skips the inclusion of the nocontent_page.

    Its a total hack that I don't think I should share as its not future-proof in any way. It will fall to pieces if/when there is an update.

    I have more projects that I would like to use this plugin for, but I will have to think long an hard until there's a solution for custom taxonomies.

    Hope to hear about one soon!

  • DavidM

    Hi notabledesign and welcome to WPMU DEV! Sorry for the delay but hopefully we can this working for you in an simpler way that wouldn't require modifications.

    Using the 1.1b version release of Membership available at the following, you can use URL Groups to specify url-based restrictions and it even provides for regular expressions so you can potentially restrict access to urls containing your specified taxonomies.
    https://premium.wpmudev.org/forums/topic/membership-11-beta

    Given that, you could specify a URL Group containing your taxonomy using the following:
    domain.com/taxonomy/.*

    And with that applied as a negative rule for a particular membership level, that membership level should then be restricted from accessing those taxonomy urls.

    Would that work for you?

    Cheers,
    David

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.