• 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

Mobile Friendly – Dynamic Sidebar Location (Genesis, Focus Theme)

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 › Mobile Friendly – Dynamic Sidebar Location (Genesis, Focus Theme)

This topic is: not resolved

Tagged: focus theme, genesis, mobile, Sidebar

  • This topic has 1 reply, 2 voices, and was last updated 11 years, 7 months ago by Lauren @ OnceCoupled.
Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • April 28, 2014 at 12:33 pm #102773
    RTMLLC
    Member

    Hello frequent users!

    I've got a client who needs their sidebar to show up on the homepage above the content, but below the content everywhere else on the site. We're using a Static homepage. Here's the temp URL: .

    From what I've found, the following code seems to not want to work.

    //* genesis_before_footer
    if ( !is_front_page() ) {
        //* This is a homepage
    	remove_action( 'genesis_after_content', 'genesis_get_sidebar' );
    	add_action( 'genesis_before_content', 'genesis_get_sidebar' );
    } else {
        // This is not a homepage
    }

    I've done a lot of alterations with the previous code, such as removing the not (!) flag, removing the else, adding the else, adding hooks into the else and a lot of other things, but for some reason all this does is turn the function on/off. It does move the sidebar location, just not dynamically, any help is appreciated!

    http://d5703435.a404.response-hosting.com
    April 28, 2014 at 8:43 pm #102842
    Lauren @ OnceCoupled
    Member

    Your comments are backwards, for starters. The first block is entered for all pages except the front page, and the second block is entered for the front page.

    Have you tried using the logical check is_home()? Depending on how your site is configured, you may just need to use that. Alternatively, you could do both: if ( !is_front_page() && !is_home() ) {

    Best,
    Lauren


    We create mobile-first, PageSpeed-optimized, pixel-perfect custom themes! https://www.oncecoupled.com

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

© 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