clarification on rules needed

I have some observations/questions with categories showing/not showing.

A problem I ran into whilst tinkering (which may help someone, and also leads to my questions):
I have a category "news" and a category "pro". In the free level, "pro" is selected as a category in the -ve rule, the reset are left blank. However, if I look at the news category page it shows a post that I gave a category of pro and news. If I make that specific post a -ve rule it goes away.

However, I noticed that my theme used query_posts within the index and served categories etc. from there. Adding category.php and just inserting the html within the loop fixes that. Is this incorrect behaviour on the theme's part or something membership should catch.

Or am I wrong in assuming that if a post can have more than one category and still be protected? My theme uses query_posts

Also, what happens if we put categories in the +ve rules, is there a point to that?

  • JoseffB

    Edited the post as per @netweblogic direction.

    Adding category.php and just inserting the html within the loop fixes that.

    What HTML are you referring to? Can you paste an example?

    Or am I wrong in assuming that if a post can have more than one category and still be protected? My theme uses query_posts

    This is a good question. I would assume it depends on if the hide "overrides" the show command. i.e. in Windows permissions a Negated permision overrides an allow permission. Same idea here. This is a better question for a developer like @aaron

  • Marcus

    here's a snippet of the index.php page (not the whole thing)
    <?php get_header(); ?>
    <?php global $query_string;
    if (is_category()) query_posts($query_string . "&showposts=$post_number&paged=$paged&cat=$cat");
    elseif (is_home()) query_posts($args);
    else query_posts($query_string . "&showposts=$post_number&paged=$paged"); ?>
    <div id="content-left">
    <?php if (have_posts()) : while (have_posts()) : the_post(); ?>
    <?php include(TEMPLATEPATH . '/includes/entry.php'); ?>
    <?php endwhile; ?>
    <?php if(function_exists('wp_pagenavi')) { wp_pagenavi(); }
    else { ?>
    <?php include(TEMPLATEPATH . '/includes/navigation.php'); ?>
    <?php } ?>
    <?php else : ?>
    <?php include(TEMPLATEPATH . '/includes/no-results.php'); ?>
    <?php endif; wp_reset_query(); ?>
    </div> <!-- end #content-left -->
    <?php get_sidebar(); ?>

    The above will not work with posts on more than one category. To make it work, I included a category.php file in my theme, and pretty much copied the above minus the conditionial statement on top and the wp_reset_query() function near the end. Now, any category lists hide the expected posts.

    I guess that answers my own question about >1 cat posts, but would be great to get a confirmation here.

    Btw, whilst slightly confusing, this plugin is very well thought out compared to other premium membership plugins.

  • Marcus

    actually, i think I made a mistake here. The post I was testing actually had a rule I forgot to remove which was a specific -ve for that post. I think what I said above is totally irrelevant.

    So, now the post shows on any category page it belongs to. The only page it won't show up on is the specific category page that's in the -ve rule. However, even if you make it a single category, the post itself is never protected so I can access it publicly.

    So, I'd love to know what the intended behavior is before I go further :slight_smile:

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.