WordPress.org

Forums

WP-Members: Membership Framework
is possible config the plugin to block only only certain categories? (4 posts)

  1. alfredo49
    Member
    Posted 2 years ago #

    Hi:

    I like to block by default all the post except news category, is this possible?

    Regards

    http://wordpress.org/extend/plugins/wp-members/

  2. Chad Butler
    Member
    Plugin Author

    Posted 2 years ago #

    There are some filter hooks that can be used to do that. There is a list of hooks in the Users Guide that will allow you to build in custom features: http://rocketgeek.com/plugins/wp-members/users-guide/filter-hooks/

  3. alfredo49
    Member
    Posted 2 years ago #

    i have been taking a look at the hooks and:

    i include this code at functions.php of my theme, but nothing happens

    add_filter( 'wpmem_block', 'my_block_function' );
    function my_block_function( $block )
    {
    if (is_category('noticias'))
    $block = false;
    return $block;
    }
    Default in wp members config , post is blocked, but with this code im trying to create an excepcion for noticias category, what im doing wrong?

    For testing i tried with $return false; directly in "my_block_function", with this sentence in theory every post would unprotected because the function takes precedence over the configuration of the plugin right? but again nothing happens, all post still protected :-S

    Thxs & Regards

  4. alfredo49
    Member
    Posted 2 years ago #

    i think that the problem is the new version of plugin (2.8.2) doesnt work in WP3.6b1

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • WP-Members: Membership Framework
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic

Tags

No tags yet.