WordPress.org

Forums

Is there such a plugin? (3 posts)

  1. MindReality
    Member
    Posted 7 years ago #

    Is there a wordpress plugin that can set my posts to display the first few sentences as an excerpt, and then display the full posts only when a user logs in?

  2. Kafkaesqui

    Posted 7 years ago #

    No need for a plugin, as the coding is trivial. Replace the_content() template tag in your templates with this:

    <?php global $user_identity;
    if ($user_identity) {
    	the_content();
    } else {
    	the_excerpt();
    } ?>
  3. MindReality
    Member
    Posted 7 years ago #

    Hi,

    This is bringing me closer to what I'm looking for.

    Where can I go to edit the excerpt length?

    Is it possible for me to select certain posts and pages to display full view to all users instead?

    Thanks for the help!

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags