• 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

Hide Sidebar on Password Protected Pages

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 › Hide Sidebar on Password Protected Pages

This topic is: not resolved

Tagged: password protected, post_password_required

  • This topic has 4 replies, 2 voices, and was last updated 8 years, 2 months ago by designbytracy.
Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • November 10, 2017 at 4:13 pm #213465
    designbytracy
    Participant

    I want to hide the sidebar on my pages that are password protected by WordPress. Why is this not working in my functions.php file?

    // Hide Sidebar without Password
    if ( post_password_required() ) {
    remove_theme_support( 'genesis-menus' );
    }


    Tracy

    Design by Tracy | Twitter | Facebook | LinkedIn

    http://sourceltg.com/tothetrade/source-lighting-introduction/
    November 10, 2017 at 5:05 pm #213468
    Brad Dalton
    Participant

    You want to remove the sidebar or menu?


    Tutorials for StudioPress Themes.

    November 11, 2017 at 9:29 am #213482
    designbytracy
    Participant

    I think I'd like to remove the sidebar so that my password login appears centered.


    Tracy

    Design by Tracy | Twitter | Facebook | LinkedIn

    November 11, 2017 at 1:08 pm #213488
    Brad Dalton
    Participant

    I think you might need CSS however, you can use PHP code to force a full width layout on password protected posts


    Tutorials for StudioPress Themes.

    November 13, 2017 at 9:00 am #213526
    designbytracy
    Participant

    Thanks for your help, Brad. I tried that code and it didn't work.


    Tracy

    Design by Tracy | Twitter | Facebook | LinkedIn

  • Author
    Posts
Viewing 5 posts - 1 through 5 (of 5 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

© 2026 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