• 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 custom sidebar on blog page and posts

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 custom sidebar on blog page and posts

This topic is: resolved

Tagged: blog, custom sidebar

  • This topic has 3 replies, 2 voices, and was last updated 8 years, 5 months ago by jmamuzich.
Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • October 17, 2014 at 4:37 pm #128200
    jmamuzich
    Member

    Hello,

    I apologize if this has already been answered somewhere (I couldn't find it).

    I have added a custom sidebar to display on single posts for my blog. I am currently using a page called 'Blog' for all my blog posts (not the front page). I am trying to figure out how I can add this sidebar on my Blog page as well as on the posts?

    Tried out a bunch of different code. Any help is greatly appreciated.

    thanks!

    - Jaclyn

    http://162.144.99.26/~sacrealt/
    October 17, 2014 at 7:31 pm #128215
    Susan
    Moderator

    Try the Genesis Simple Sidebars plugin.

    October 20, 2014 at 9:50 am #128443
    jmamuzich
    Member

    Susan,

    Thank you for the suggestion, but I'm trying to do it without having to use a plugin.

    thanks

    October 20, 2014 at 10:47 am #128450
    jmamuzich
    Member

    Thanks to NutsandBolts for the solution:

    After registering my sidebar:

    add_action('get_header','custom_blog_sidebar');
    function custom_blog_sidebar() {
    if ( is_home() || is_single() ) {
    remove_action( 'genesis_sidebar', 'genesis_do_sidebar' );
    add_action( 'genesis_sidebar', 'do_sidebar' );
    }
    }

  • Author
    Posts
Viewing 4 posts - 1 through 4 (of 4 total)
  • The topic ‘Display custom sidebar on blog page and posts’ 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