• Skip to main content
  • Skip to forum navigation

StudioPress

  • Shop for Themes
  • My StudioPress

Forum navigation

  • Home
  • General Genesis Discussions
  • StudioPress Themes
  • Genesis Blocks
    • Genesis Blocks
    • Genesis Custom Blocks
  • Retired Themes
  • FAQs
  • Forum Rules
  • Internationalization and Translations
  • Forum Bugs and Suggestions
  • Forum Log In

Are You Using The WordPress Block Editor?

Genesis now offers plugins that help you build better sites faster with the WordPress block editor (Gutenberg). Try the feature-rich free versions of each plugin for yourself!

Genesis Blocks Genesis Custom Blocks

How to remove "This content is password protected…" from content feedsummaries

Welcome!

These forums are for general discussion on WordPress and Genesis. Official support for StudioPress themes is offered exclusively at My StudioPress. Responses in this forum are not guaranteed. Please note that this forum will require a new username, separate from the one used for My.StudioPress.

Log In
Register Lost Password

Community Forums › Forums › Archived Forums › Design Tips and Tricks › How to remove "This content is password protected…" from content feedsummaries

This topic is: resolved
  • This topic has 2 replies, 1 voice, and was last updated 3 years, 4 months ago by ilkweb.
Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • October 2, 2019 at 5:09 am #493824
    ilkweb
    Member

    Hi everyone,

    I'm hoping there's a Genesis plugin that can remove the default post summary used in the content feed, when a post is password protected.

    What I would like, is that when a visitor loads the blog content feed, they see all the password protected posts with the title and a brief summary.

    What I do not want is the password-protected default post summary text showing in the content feed.

    The text reads: "This content is password protected. To view it please enter your password below: Password:"

    Here's a screenshot of what I see versus what I want to achieve:

    null

    October 2, 2019 at 11:29 am #493832
    ilkweb
    Member

    I've been referencing this WP codex link for the code for other parts of the password protection functionality I've been customizing.

    October 3, 2019 at 4:59 am #493838
    ilkweb
    Member

    I solved it with this code:

    function my_excerpt_protected( $excerpt ) {
    if ( post_password_required() ) {
    $post = get_post();
    $excerpt=$post->post_excerpt;
    }
    return $excerpt;
    }
    add_filter( 'the_excerpt', 'my_excerpt_protected' );
  • Author
    Posts
Viewing 3 posts - 1 through 3 (of 3 total)
  • The topic ‘How to remove "This content is password protected…" from content feedsummaries’ is closed to new replies.

CTA

Ready to get started? Create a site or shop for themes.

Create a site with WP EngineShop for Themes

Footer

StudioPress

© 2023 WPEngine, Inc.

Products
  • Create a Site with WP Engine
  • Shop for Themes
  • Theme Features
  • Get Started
  • Showcase
Company
  • Brand Assets
  • Terms of Service
  • Accptable Usse Policy
  • Privacy Policy
  • Refund Policy
  • Contact Us
Community
  • Find Developers
  • Forums
  • Facebook Group
  • #GenesisWP
  • Showcase
Resources
  • StudioPress Blog
  • Help & Documentation
  • FAQs
  • Code Snippets
  • Affiliates
Connect
  • StudioPress Live
  • StudioPress FM
  • Facebook
  • Twitter
  • Dribbble