• 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

Change Sidebar on a template

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 › Change Sidebar on a template

This topic is: not resolved

Tagged: custom sidebar

  • This topic has 3 replies, 2 voices, and was last updated 6 years, 8 months ago by Brad Dalton.
Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • July 28, 2016 at 12:12 am #190356
    Latsuj
    Member

    Hello everyone,

    I'm actually trying to change the default primary & secondary sidebar on a template.
    I have created a sidebar called : "search-sidebar" and I would like to set this sidebar on a template with php code instead of the primary and secondary sidebar.
    I have tried differents ways for achieving this but I cannot. Can someone help me with this ?

    Thank you in advance,
    Kevin.

    July 28, 2016 at 12:57 am #190357
    Brad Dalton
    Participant

    Try the Genesis Simple Sidebars plugin if you don't know how to hand code it.


    Tutorials for StudioPress Themes.

    July 28, 2016 at 1:12 am #190359
    Latsuj
    Member

    I think, I got this. I have writted this snippet :

    unregister_sidebar( 'sidebar' );
    unregister_sidebar( 'sidebar_alt' );
    add_action( 'genesis_sidebar', array($this,'kv_genesis_do_sidebar_search'));

    public function kv_genesis_do_sidebar_search() {
    dynamic_sidebar(iKvSearch::SIDEBAR);
    }

    where iKvSearch::SIDEBAR is the name of my sidebar

    If you have any better solution, I would be happy atht you share your idea.

    July 28, 2016 at 1:42 am #190360
    Brad Dalton
    Participant

    I would look at how the sidebar is added in Genesis.


    Tutorials for StudioPress Themes.

  • Author
    Posts
Viewing 4 posts - 1 through 4 (of 4 total)
  • The forum ‘Design Tips and Tricks’ 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