• 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

Removing sidebar for Single Blog Posts Categorized as "Testimonials"

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 › Removing sidebar for Single Blog Posts Categorized as "Testimonials"

This topic is: resolved

Tagged: removing sidebar from single blog entries

  • This topic has 3 replies, 2 voices, and was last updated 10 years, 1 month ago by alethamcmanama.
Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • May 18, 2015 at 7:54 pm #152642
    alethamcmanama
    Member

    For single blog posts categorized as "Testimonials", the client wants the sidebar to be removed. How do I go about doing this specific for just this category?

    For example, here is a single blog post (a testimonial) that has the sidebar with Recent Posts and a text widget called, "Click here for..". Need to remove the sidebar for these.

    http://srinikahealing.com/draft/my-shortness-of-breath-also-improved-with-this-treatment-b-h/

    Thanks for your help!

    Warmly,
    Aletha McManama

    http://srinikahealing.com/draft/my-shortness-of-breath-also-improved-with-this-treatment-b-h/
    May 18, 2015 at 9:43 pm #152652
    Graham
    Member

    Possibly force full width content if single view and in Testimonials category

    add_filter( 'genesis_pre_get_option_site_layout', 'child_maybe_full_width_content' );
    function child_maybe_full_width_content( $opt ) {
        if ( is_single() && in_category( 'Testimonials' ) ) {
            $opt = 'full-width-content';
            return $opt;
        }
    }

    My JustGiving page: https://www.justgiving.com/helping-graham-give

    May 18, 2015 at 9:52 pm #152654
    Graham
    Member

    Or, conditionally remove sidebar without forcing full width layout. e.g.

    add_action( 'get_header', 'child_maybe_remove_sidebar' );
    function child_maybe_remove_sidebar() {
    	if ( is_single() && in_category( 'Testimonials' ) ) { 
    		remove_action( 'genesis_sidebar', 'ss_do_sidebar' );
    		remove_action( 'genesis_sidebar', 'genesis_do_sidebar' );
    	}
    }

    My JustGiving page: https://www.justgiving.com/helping-graham-give

    May 21, 2015 at 4:42 am #153075
    alethamcmanama
    Member

    Thanks, Graham! I went with the full width content filter above. Worked like a charm!

    Thanks again for your help.

    Warmly,
    Aletha McManama

  • Author
    Posts
Viewing 4 posts - 1 through 4 (of 4 total)
  • The topic ‘Removing sidebar for Single Blog Posts Categorized as "Testimonials"’ 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

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