MemberMouse provides several different ways to show or hide content based on the currently logged in member's access rights. You can protect pages/posts, RSS feeds, search results, archives and even specific portions of a page/post using a Decision SmartTag.
However, some areas of your WordPress site are created via a template page. Templates are the files which control how your WordPress site will be displayed on the Web. These files draw information from your WordPress MySQL database and generate the HTML code which is sent to the web browser, and can include things like category pages, blog pages, tag pages and more. Read this article to learn more about WP templates.
MemberMouse does give you the ability to show an excerpt of your post on these pages using the <!--more--> tag. Read this article to learn how to protect post excerpts. If you are looking to protect the entire page, you can follow these steps:
- Find the archive or template page that your theme uses for that page (this article will show you how)
- At the top of your template page, add this code
if(mm_member_decision(array("isMember"=>"false")) || mm_member_decision(array("membershipId"=>"1")))
- In the code above, anyone who is not a member (or is not logged in), or is a member level of ID1 (usually the free membership, but you will want to check by finding your membership level IDs) will get the error page as well.
- This code is using code similar to the
MM_Member_DecisionSmartTag. You can adjust it to protect the template based on information associated with the currently logged in member. Read this article to learn more about