Tips and Tricks HQ Support

Support site for Tips and Tricks HQ premium products

  • Home
  • Contact Us
  • Documentation
  • Forum Home
    • Forum
    • Forum Search
    • Forum Login
    • Forum Registration

How to block post titles in a category

by

Tips and Tricks HQ Support Portal › Forums › WP eMember › How to block post titles in a category

Tagged: block category content, post titles

  • This topic has 2 replies, 3 voices, and was last updated 13 years, 3 months ago by zenfred.
Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • January 9, 2012 at 2:13 am #5218
    Pixeldrummer
    Member

    I’ve been working on setting up the WP eMember plugin and am now not sure if I bought the right one. After reading reams of tips and posts and answers, I have not found the right way to block out all posts in a category, INCLUDING POST TITLES, until a user is logged in. My main menu will show two categories. One is open, the other protected. Community History is public, Community Members is not.

    Those post titles should be blocked in all instances, including an archive page, only the category title should show, and when clicked there should be a prompt to join, or log in and nothing else on the page (such as an empty comments form container). I know this has been discussed, but I couldn’t make out the solution from the discussions. I am not a coder, that’s why I bought the plugin. Am using Thesis so can create custom functions.

    The site is very much a work in progress: http://www.devtests.com/. Am testing the best way to use the eMember plugin at present and getting very frustrated. Can you help?

    January 9, 2012 at 4:14 am #40529
    Peter
    Member

    Hi,

    The following post may help:

    https://support.tipsandtricks-hq.com/forums/topic/hide-protected-content

    As an example here’s a modification I did as a test for the “Twenty Eleven” theme.

    This an example for when a post is displayed on a single page – ie, I edited the content-single.php file:

    The original line of code was as follows:

    <h1 class="entry-title"><?php the_title(); ?>

    To suppress the heading, I modified it as follows:

    <h1 class="entry-title"><?php if(wp_emember_is_member_logged_in()) the_title(); ?>

    The above is a simple example which will suppress the post heading if someone is not logged in. You may also want to add a message in an “else” branch if you desire.

    Note: You will need to do something similar for other instances where the post heading is displayed too such as in pages, or post excerpts etc.

    Another option is to use site-wide protection

    Hope this helps.

    February 25, 2012 at 12:01 am #40530
    zenfred
    Member

    I wanted to hide the page titles in my child of twenty eleven theme and this worked great. Titles are in content-page.php and content-single.php

  • Author
    Posts
Viewing 3 posts - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.
Log In

Forum Related

  • Forum Home
  • Forum Search
  • Forum Registration
  • Forum Login

Support Related Forms

  • Contact Us
  • Customer Support
  • Request a Plugin Update
  • Request Fresh Download Links

Useful Links

  • Plugin Upgrade Instructions
  • WP eStore Documentation
  • WP eMember Documentation
  • WP Affiliate Platform Documentation
  • Tips and Tricks HQ Home Page
  • Our Projects

Quick Setup Video Tutorials

  • WP eStore Video Tutorial
  • WP eMember Video Tutorial
  • WP Affiliate Platform Video Tutorial
  • Lightbox Ultimate Video Tutorial

Our Other Plugins

  • WP Express Checkout
  • Stripe Payments Plugin
  • Simple Shopping Cart Plugin
  • Simple Download Monitor

Copyright © 2025 | Tips and Tricks HQ