This article discusses a few methods to denote the post or page “excerpt”, which you can use to specify the portion of members-only content that’s “teaser text” for non-members.


The Decision to Show or Hide Excerpts

Under the Memberships > Advanced Settings admin page, there is a setting labeled “Show Excerpts to Non-Members”. When set to “Yes”, all of your members-only posts and pages will show the “excerpt” to a non-member, whether that’s a logged out “visitor” to your site or a logged in user or member that doesn’t meet membership requirements.


But what is the excerpt?

For a WordPress post or page, the excerpt can be one of the following:

  • For posts (only) this is the specific content you have placed in the “Excerpt” meta box on the Edit Post screen.
  • For pages and posts, this is the portion of content up to the defined “excerpt length”. By default, excerpt length is 55 words. You can filter excerpt_length using this method from the WordPress Codex.
  • For pages and posts, this is the portion of content up to the defined “Read More” tag. <!--more-->

So, your options for defining the excerpt are:

  • Do nothing and let the excerpt_length filter set the excerpt (Default: 55 words).
  • Write specific content for the post excerpt in the “Excerpt” meta box (posts only).
  • Use the “Read More” tag (my recommended method for posts and pages).

Note that your theme may handle the post excerpt in its own unique way so if the methods outlined in this article do not work in your current theme, contact your theme author or open a topic in our members forum for support.


What’s the “Read More” tag and how do I insert it?

Think of the “Read More” tag as a way to “cut” your content – defining what portion is shown in archives and searches vs. the full content’s “single” view. For a members-only post, you can think of the content before the “Read More” tag as the teaser text, defining which piece is “public” and which is “private”.

The “Read More” tag can be inserted via a button in the Visual and Text editor or by entering this: <!--more-->. See the button highlighted in the Visual editor in the image below. For the Text editor, it’s just a button that says “More”.

pmpro_read-more-tag

When you view a post in excerpt form (on the page for posts or in archive or search form), only the content before this tag will appear, followed by a default, “Continue Reading” link. You can change the text of this generated link by editing the post, click to the Text Editor and look for <!--more-->. Add a space after “more” and insert the custom message like <!--more Keep Reading!-->.

On the single view, the full content (including the content above the <!--more-->) will show. If your post requires membership and you have “Show Excerpts to Non-Members” set to “Yes”, only the excerpt will appear on the single view, followed by the appropriate “Message for Logged-in Non-members:” or “Message for Logged-out Users:”.

If your post requires membership and you have “Show Excerpts to Non-Members” set to “No”, no excerpt will appear on the single view. The single view will only display the title followed by the appropriate “Message for Logged-in Non-members:” or “Message for Logged-out Users:”. Posts that require membership will still appear in the page for posts, archives, and searches, they will simply contain the post title and message defined under Memberships > Advanced Settings.


Taking This to the Next Level Using the [membership] Shortcode

So now that you’ve mastered the art of defining post and page excerpts, how can you do even more to appropriately “tease” members-only content, without taking away from the experience for your paid members? Welcome to the big leagues: the [membership] shortcode.

You can use the [membership] shortcode to show a unique excerpt to your members and non-members. Here’s an example:

Title:

Post Content:

In this example, I’m using the shortcode to show a different excerpt to my member and non-member. More information on using the [membership] shortcode. Neat!


Time to Kiss Your Brain

I hope this tutorial has broadened your WordPress and Paid Memberships Pro knowledge. For those of you that were already clued in to the excerpt methods above, try using the shortcode example to further enrich your membership site’s user member experience.

I’m working on the new MemberLite theme and have been using the “Read More” tag to not only denote excerpts, but to enhance the page appearance without adding (needless) custom meta boxes and database table rows. Get started using the tutorial above, and you’ll be ahead of the game when the theme is released!

If you’re using excerpts in other unique ways for your membership site, I’d love to hear about it in the comments below.


Thanks for the great article addressing exactly my issue of excerpt not being teaser on public part of my blog. I have cyber pro theme so need to look for hangup but your new version seems to be going in right direction. Keep up that good work. My site isnt making money but getting the message out to help people in the trading world I hope makes me your fan.

Thanks
Alan Palmer
nasdog.com /blog

I only did this 3 weeks ago and struggle but have hope?

I was having a problem with all the text in a restricted page showing up minus the content to any one not logged in or the wrong access and added read more and it worked.

Leave a Reply

Your email address will not be published. Required fields are marked *