WordPress and aMember: Teasers

There is a newer article on WordPress + aMember integration here. -a much simpler way of setting up teasers too.

Combined with aMember, WordPress is a great CMS to use for a membership site. If you have a site where all the content is considered members only it’s a simple matter of using aMember to protect the whole site.

By protecting your entire WordPress directory all your content is protected by aMember. (This is done by using the ‘Protected Folders’ portion of the aMember admin panel.) This means that when users go to any page, even the homepage, they will see only the aMember login/signup screen until they login or sign up and login.

If you want to protect specific content rather than locking down your entire site you can install a WordPress plugin like the ViewLevel2 plugin. This will allow you to set the ‘viewlevel’ of each post/page.

The benefit of using per-post protection is that you can easily mix public and protected content. Using the ViewLevel2 plugin, the titles and excerpts of protected content can be displayed to those not logged in.

How do I display teasers to those who are not logged in?

Using the ViewLevel2 plugin, altering your theme to display teasers is a simple matter of only using <?php the_content(); ?> in your single.php theme file. All other theme files should contain
<?php the_excerpt(); ?>.

By using <?php the_excerpt(); ?> ViewLevel is allowed to display the excerpts. Otherwise, none of the protected posts would show up to those not logged in.

You may wish to use the default excerpt tag above or something more flexible like the_excerpt_reloaded plugin, which does several very nifty things: 1) allows you to set the excerpt’s word length, 2) choose which html tags will be allowed to render in the excerpts, 3)add ‘read more’ link to the full content page, as well as input the exact link text from within the excerpt_reloaded tag.

see also:

  • How to Customize Excerpts for Your WordPress Theme for more information on customizing excerpts in WordPress.
  • Optional Excerpts for information on using the ‘optional excerpt’ field to specify teaser text rather than automatically excerpting from a post’s full content. This allows for an additional layer of protection for premium content.

If you would like more hands-on assistance with your aMember integration contact us with the details of your site.

p5rn7vb

Leave a Reply