My situation has changed from previous posts. I have

Hello

My situation has changed from previous posts. I have been trying to give selective access to Custom Posts. I have been doing that successfully (although a bit complicated) through combination of URL groups. "Categories" were not available.

Now, the plugin that generates the custom post types has been altered and it is possible to assign a standard category to each custom post.

In principle, this means that all I have to do control access is to create a Membership Level where Category is placed in the "Positive Rules". My understanding is that access through that membership level will entitle the member to access only Posts whose Category is specified in the positive rules.

HOWEVER... that does not work. Instead, anyone who has access to the protected url AND who is logged in as something higher than a FREE user can have access to everything.

Does this mean that Categories do NOT protect Custom Posts (only regular posts)? Or am I doing something wrong?

Control through categories would simplify my life a lot.

Thanks for any advice.
Andrew

  • PC

    Hello Andrew,

    Greetings and thanks for posting on the forums.

    Memberhsip plugin does not pick the custom post type taxonomies out of the box. If you want to protect custom post types, you should use URL groups rather than categories.

    The categories you are placing in the Positive rules are post categories and not your custom post type categories.

    So URL groups should be as easy as

    yoursite.com/post_type/category or whatever the permalink structure is.

    Is that (URL Groups) not working for you ?

    Cheers
    PC
    Sales &Support

  • Andrew

    Thank you very much for your prompt response PC.

    Maybe I should explain a little more. I am aware that Membership does not normally pick up custom post type taxonomies out of the box. However, the plugin designer has enabled his custom types to be linked with standard post categories. This means that Membership actually DOES see the categories. What it does not seem to do is to protect categories not permitted through the positive (or negative) rules - beyond a user login above the "Free" access level.

    In answer to your question, yes I am in fact able to control everything through URL groups (after dealing with several difficulties and some frustration which I have described in detail in previous posts e.g. do NOT leave a blank line at the end of each URL group rule - this does not seem to be documented anywhere and is the kiss of death for access control).

    I would prefer not to deal with URL groups if possible as I may ask inexperienced persons to enter protected information. Using Categories would simplify things.

    Thanks for any further thoughts.

    Andrew

  • PC

    Hey Andrew,

    (after dealing with several difficulties and some frustration which I have described in detail in previous posts e.g. do NOT leave a blank line at the end of each URL group rule - this does not seem to be documented anywhere and is the kiss of death for access control).

    Thanks for pointing this out. I have asked our docs guy @Patrick Cohen to make a note of it for future versions of the usage guides :slight_smile:

    However, the plugin designer has enabled his custom types to be linked with standard post categories. This means that Membership actually DOES see the categories. What it does not seem to do is to protect categories not permitted through the positive (or negative) rules - beyond a user login above the "Free" access level.

    So you mean to say that the categories which are used by posts are also used by the custom post plugin you have right ? and membership is not protecting those with the category rules ?

    What about standard posts ? is it protecting them ?

    When we talk about a category archive, theoretically it would be showing both the post types on it right ?

    Please advise.

    Cheers
    PC
    Sales &Support

  • Andrew

    So you mean to say that the categories which are used by posts are also used by the custom post plugin you have right ? and membership is not protecting those with the category rules ?

    Yes... that's what I mean.

    What about standard posts ? is it protecting them ?

    I know I should have checked but had not had the time. I will try it.

    When we talk about a category archive, theoretically it would be showing both the post types on it right ?

    Yes that is correct...

    Maybe there is something wrong with my setup (but I honestly do not think so...)

    I will report back on the ordinary posts.

    Thanks
    Andrew

  • Andrew

    Update 1

    If I go to

    http://my_site/e2/wp-admin/edit-tags.php?taxonomy=category

    the page correctly identifies that there are five posts in a specific category (in the posts column). However, if I click on the number 5 in the posts column, the system says it cannot find any posts.

    If I take a real post and attribute it to the Custom Type Category, the number of posts in the category is incremented by one (now 6). I click on 6 and it shows the one "real" post assigned to the category.

    It looks as if the categorisation of the custom posts is not exactly the same as that of ordinary posts. Presumably that is where the problem occurs.

    More later - maybe it has all be a wild goose chase.

    Andrew

  • PC

    Hey Andrew,

    Thanks for posting back and letting me know the current status. Sorry about the delay here, I was not well.

    It seems to protect real posts belonging to the categories created for the custom posts.

    Certainly the developer missed something out there perhaps he did not share the taxonomies properly.

    http://wordpress.stackexchange.com/questions/44039/common-categories-for-two-custom-post-types

    Cheers
    PC
    Sales &Support

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.