• I can get other pages to password protect, but any page that has a blog template won’t protect. It still will show blog post titles and metadata. Is there any work arounds for this?

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Chad Butler

    (@cbutlerjr)

    The plugin doesn’t actually block a blog page because in the WP sense of the term “page” it is not actually a page. It’s generated as a type of archive template, which the plugin does not block. This is mentioned in the plugin’s description and is also covered in this FAQ and a deeper coverage of the topic can be read here.

    As a quick aside to avoid a discussion of opinion on what the plugin “should” do, let me say that this handling is intentional based on the plugin’s core approach to content which to provide “teaser” content to lead the user to register for full access.

    I understand that doesn’t fit everybody’s use case. And there are alternative ways to handle these while still using WP-Members.

    First, and simplest, is to redirect the user from a blocked item (or items) using the wpmem_redirect_to_login() function available in the plugin’s API. This allows you to totally customize it to your need/use. So you could redirect just this page, or all blocked pages, or specific pages, or whatever.

    A number of settings that do this automatically are available in the premium WP-Members Advanced Options extension. I’m not saying this to “push” to you premium, just noting that it’s available for you (or anyone else reading this later). There are lot of available options in the extension; redirecting blocked content is just one of them.

    Lastly, I am working on WP-Members 3.2 targeting an early January release date. In 3.2, there will be new settings for handling content specifically to broaden the scope of the plugin. Some people’s approach to content is different from what the plugin was born out of, so I’ve listened to that need and responded with some new features.

    First, this version will add a third option for content beyond “block” and “unblock” adding an option to “hide” content. Hidden content will not display at all unless the user is logged in (or has access).

    This setting would mean that on a “blog” page, any content marked as hidden would not be included in The Loop (or on any other archive template). It simply would not exist until the user is logged in.

    Since we’re on the topic of what’s coming in 3.2, I’ll mention that it will also include a new feature to identify “Products”. I’ve chosen this to go beyond the scope of “levels” or “groups” because not all content fits those terms. 3.2 will begin moving the plugin toward supporting products that are customizable and can be “levels” (hierarchical), or groups (A & B, or A & C, or B & C, etc), or single content and downloads. This will lead to broader compatibility with learning systems and ecommerce systems (such as WooCommerce). But that’s getting a little of topic of this thread – I just wanted to mention it.

    If you want to try the new version with the “hide” setting, you can – HOWEVER, I must note that it is currently a development version and WILL see significant changes from what is available in the dev version. There will be some changes to WP-Members db settings in regards to the fields array that are not currently worked out and are not in the available dev version. So going from this dev version to the final production has some unknowns involved and with that in mind I will say that this should only be considered for testing and reviewing new features. I wouldn’t recommend it for production use (although I can say that it is currently running on the WP-Members premium support site https://rocketgeek.com).

    Thread Starter izzyandjasper

    (@izzyandjasper)

    Hi Chad-

    Thank you so much for the reply. Is there a how-to article for the wpmem_redirect_to_login() function. It sounds like it could work for me, but wasn’t really able to follow the article page you sent.

    Thanks!

    Plugin Author Chad Butler

    (@cbutlerjr)

    The documentation page has a couple of examples. Applying custom code snippets and some links to additional information can be found here:
    https://rocketgeek.com/basics/using-code-snippets-from-the-site/

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Blog Page won’t password protect’ is closed to new replies.