• 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

Sidebar missing on custom archive page

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 › Sidebar missing on custom archive page

This topic is: resolved

Tagged: archive page, custom menu, Sidebar

  • This topic has 10 replies, 2 voices, and was last updated 13 years, 1 month ago by csbeck.
Viewing 11 posts - 1 through 11 (of 11 total)
  • Author
    Posts
  • January 11, 2013 at 9:28 am #11219
    csbeck
    Member

    I've designed a custom site based on Agency though it's drastically different from Agency. I've created some custom Archive pages to show particular category posts and custom fields. Since updating Genesis (just this week) my sidebar is missing from these pages. Can someone take a look at my code to see if I'm doing something incorrectly?

    Staging site: http://www.rdldev.beckerstudio.com

    One of the pages in question: http://www.rdldev.beckerstudio.com/test-catalog/new-tests
    Code for one of the Archive pages

    January 11, 2013 at 9:36 am #11225
    csbeck
    Member

    Here's the code for one of the Archive pages ( I had some challenges with putting the link in my original submission above):
    https://gist.github.com/4511552

    As a further note, the sidebar is supposed to show a custom menu. I created the menu just fine and put it in a sidebar widget and it's showing on the parent page: http://rdldev.beckerstudio.com/test-catalog
    So I know the menu and sidebar actually work. It's just they aren't showing up in my custom archive pages - although they did before I upgraded Genesis. Looking at the page source though for those archive pages in the browser, there is a div or section for the sidebar - it shows an empty div. It's strange. I'm betting though that I'm doing something wrong.

    Again, thanks for your time.

    January 11, 2013 at 9:49 am #11234
    David Decker
    Member

    In the Gist code snippet I can see no reference of a sidebar for displaying. There's currently no "get_sidebar( 'id-of-sidebar' );" function or for just a widget area, no "dynamic_sidebar( 'id-of-sidebar' );" function.

    You need to add on or the other to your template to get an registered sidebar or widget area displayed.


    Twitter @deckerweb // Google+ // My Genesis & WordPress Plugins // German Translations for Genesis

    January 11, 2013 at 10:10 am #11245
    csbeck
    Member

    Thanks so much David. Thanks to you I'm getting close. So I've added the sidebar in and it's showing now. But I can't see where to put it correctly. I've tried several places and it doesn't seem to end up in the <div id="sidebar"> instead it goes into a separate div below it. So styling is off, which I could deal with, but there is still a <div id="sidebar"> above my new div and there's still an empty text widget inside that. I'd ultimately like to replace the empty text widget with my sidebar so that styling works as it does on the Test Catalog page. Thoughts?

    January 11, 2013 at 11:12 am #11260
    David Decker
    Member

    Great 🙂

    I understand what you mean! Please try to add this line of code before the first code line where it says "get_header":
    remove_action( 'genesis_sidebar', 'genesis_do_sidebar' );

    Does that work?


    Twitter @deckerweb // Google+ // My Genesis & WordPress Plugins // German Translations for Genesis

    January 11, 2013 at 11:43 am #11270
    csbeck
    Member

    Thanks David.

    Unfortunately, it didn't remove the empty widget or put mine in that location.

    Updated code: https://gist.github.com/4511552

     

    January 11, 2013 at 11:58 am #11276
    David Decker
    Member

    Ah, I've got it to work now and finally tested it before posting here... 🙂

    Forked to this: https://gist.github.com/4512672

    ---> removed dynamic_sidebar... at the bottom --- changed/added stuff on top of file. For me this worked, I hope for you too 🙂


    Twitter @deckerweb // Google+ // My Genesis & WordPress Plugins // German Translations for Genesis

    January 11, 2013 at 12:09 pm #11280
    csbeck
    Member

    Wow! Absolutely amazing. You are a magician. Thanks so much for helping.

    BTW - the empty text widget is still in there. Weird. At least it's under mine so it doesn't mess it up.

    Can you explain why this worked before the latest Genesis update?

    January 11, 2013 at 12:19 pm #11286
    David Decker
    Member

    Mmh, really don't know why it worked before v1.9.x --- the code we both used now should also work before v1.9. I have to do some deeper look into code changes between 1.8.x and 1.9.x before I might understand why...

    For the text widget on your test site: I see it but it is definitely wrapped into THAT sidebar, so it must be an active widget in this sidebar otherwise I cannot explain it. On my test site I don't have it there.

    Are you sure it isn't setup in this widget area?

    So maybe this could also be some strange WP behavior where widget settings get mixed up internally... especially when changing themes or plugins (which register sidebars/widgets).

    You could test with another sidebar id in the above code if it's still there.


    Twitter @deckerweb // Google+ // My Genesis & WordPress Plugins // German Translations for Genesis

    January 11, 2013 at 12:26 pm #11288
    David Decker
    Member

    I just did a code comparison between 1.8.2 and 1.9.x and could not find any change that would have lead to your issue with the custom sidebar. To be honest, there aren't any changes at all regarding the sidebars between those versions 🙂

    I assume there must be any other modification maybe that was blocking it. Anyways if it's working now, that's what matters 🙂 And from my point of view we've found Genesis/WP compliant way of doing it so it should be future-proof.


    Twitter @deckerweb // Google+ // My Genesis & WordPress Plugins // German Translations for Genesis

    January 11, 2013 at 2:09 pm #11313
    csbeck
    Member

    Thanks so much for helping with the solution and looking into the issue. You have been very helpful. I'll look into switching things around to see if something shows why this worked earlier, but like you said, I'm mostly happy that it works without breaking.

    You rock!

    Chris

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

© 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