• 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

display excerpt but hide article body behind login

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 › General Discussion › display excerpt but hide article body behind login

This topic is: not resolved

Tagged: content limit, full content, is_user_logged_in

  • This topic has 6 replies, 2 voices, and was last updated 6 years, 5 months ago by Brad Dalton.
Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • August 22, 2016 at 9:47 am #191788
    nettsales
    Member

    Hi, Just setting up a new blog and we want to display the header and either the first couple of line of each blog or an excerpt to all users but only display the full articles to logged in users.

    Is this possible out of the box in Genesis, or do we need to do something extra?

    Thanks,
    Simon

    http://nett-sales.com
    August 22, 2016 at 10:29 am #191791
    Brad Dalton
    Participant

    Not possible out of the box however you can use custom code to do this with the is_user_logged_in conditional tag.


    Get Help – Book Consultation.

    August 22, 2016 at 10:53 am #191793
    nettsales
    Member

    OK thanks Brad. I'll get the technical guy here to look at this then!

    August 22, 2016 at 11:13 am #191796
    Brad Dalton
    Participant

    Are you referring to archive pages or all pages and posts?


    Get Help – Book Consultation.

    September 7, 2016 at 7:41 am #192745
    nettsales
    Member

    pages and posts Brad.

    We've now had someone build some custom code for us but are on the next stage of working out how to integrate this with the login page...!

    September 7, 2016 at 9:27 am #192752
    Brad Dalton
    Participant

    Interesting. Did you want to display a login form for logged out users on single posts and pages?


    Get Help – Book Consultation.

    September 7, 2016 at 11:14 am #192759
    Brad Dalton
    Participant

    I spent a couple of hours working on this solution.

    It limit the content to any character limit you set in the code on single posts and pages only for logged out users and displays a login form below the content limit for logged out users only. The full content is viewable for all logged in users.


    Get Help – Book Consultation.

  • Author
    Posts
Viewing 7 posts - 1 through 7 (of 7 total)
  • The forum ‘General Discussion’ is closed to new topics and 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