WordPress.org

Ready to get started?Download WordPress

Forums

WP-Members
WP Members conflict with WP_Query in loop? (5 posts)

  1. bento
    Member
    Posted 3 years ago #

    I have a problem with the WP Member plugin. I am displaying one post of one category (#7) on my homepage. This post is not blocked but still the login form appears. I have deactivated the "Block Posts by default" setting.

    Is there any conflict with the WP_Query? How do I unblock this post on the homepage. I don`t have this problem anywhere else on the site.

    This is the code:

    <?php $recent = new WP_Query("cat=7&showposts=1"); while($recent->have_posts()) : $recent->the_post();?>
    	<div class="box post" id="post-<?php the_ID(); ?>">
    	<p class="date"><?php the_time('F j, Y') ?></p>
    	<h2><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title_attribute(); ?>"><?php the_title(); ?></a></h2>
    		<div class="entry">
    			<?php the_content('<p class="serif">Read the rest of this page &raquo;</p>'); ?>
    			<?php edit_post_link('Edit this entry.', '<p>', '</p>'); ?>
    		</div>
    	</div>
    <?php endwhile; ?>

    Please help, otherwise this plugin works great!
    Thanks!

  2. Chad Butler
    Member
    Plugin Author

    Posted 3 years ago #

    When posts are blocked and replaced with login/registration, it is a filter of the_content, so glancing over what you have, I'm not sure why that wouldn't be working (since you have unchecked block posts by default).

    I'll take a look on my testing server later and see if I can come up with a better answer.

  3. bento
    Member
    Posted 3 years ago #

    @cbutlerjr, Thank you for checking on this issue.

    Actually I came across some other odd behaviour where the WP Member plugins blocks random posts (which are not blocked), otheres are not blocked as it should be. I have deactivated the plugin for now since the behaviour is too arbitrary.

    I don't know if this is important, I used to have the Wishlist Member plugin installed (http://member.wishlistproducts.com/), but it's deactivated. Did this plugin change some settings what`s blocked or not? Though it's deactivated and I think it should not have any effect anymore.

  4. Chad Butler
    Member
    Plugin Author

    Posted 3 years ago #

    With the additional information you provided, I have to say I can't be certain what would be causing these issues. It's certainly not typical behavior for the plugin.

    I don't believe Wishlist Member plugin would collide with it if it is deactivated (couldn't speak to that specifically as I do not have a copy of the plugin to test with, but I don't see why a deactivated plugin would cause an issue).

    We could try to track this down if you want. I would need more info, such as what version of the plugin you are using, what version of WP, etc. Also, do you have a location that I could take a look - perhaps a test site that you could provide a login to? Let me know if you want to go down that road...

  5. bento
    Member
    Posted 3 years ago #

    I actually tweaked the WordPress site to have almost the same feature as WP Member, checking with "is_user_logged_in" if a user is logged in to view a certain category. In a way this is actually more convenient, since I do not need to block posts individually (blocking of entire categories is a feature WP Member does not provide yet, right?).
    So I am not using WP Member on this client site for now, unfortunately it's close to being released and I can't give access to it.

    I hope this info can help you to track down the issue:
    - WP 3.0.2
    - WP Member 2.3.2 (now deactivated)
    - Other active plugins: Contact Form 7, Hide Admin Panels, Hide Update Reminder, Hide WP Generator, Hide WP Update Reminder, Magic-fields, Peter's Login Redirect, Remove Title Attributes, SimpleModal Login, Social Media Widget, all most recent version.

    The strange thing was that WP Member started blocking arbitrary posts - which were not blocked - of various categories all over the site.

    Many thanks, I appreciate that you are giving active support to your plugin.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic