• Looking for a little help or advice using the “Member Access” plugin v1.1.3.

    When calling a custom query in my theme like this:

    <?php query_posts("showposts=2&cat=7");
    if (have_posts()) :
      while (have_posts()): the_post(); ?>

    if all the resulting posts are set to “Members Only” the query breaks for visitors who are not logged in. This results in only half of the page loading and is a real problem.

    Does anyone have any advice on a solution or something I’m missing?
    Is there a way I can skip over “Members Only” posts in the query if the user is not logged in or at least close the query loop properly without it breaking.

    Thanks, any thoughts would be so appreciated!

    http://wordpress.org/extend/plugins/member-access/

Viewing 1 replies (of 1 total)
  • Plugin Author brownoxford

    (@brownoxford)

    I tried to reproduce this, but the only issue that I could find is that it is invalid PHP (when using alternative syntax for control structures you can’t omit the closing ‘endif;’, ‘endwhile;’ etc.

    If I updated the PHP so that it parses correctly, I was not able to see your error. Are you still seeing this problem? If so, can you paste the exact code you have in place?

Viewing 1 replies (of 1 total)
  • The topic ‘[Plugin: Member Access] Breaks query if all posts are Members Only’ is closed to new replies.