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

Community Forums Forums General Discussion Mobile Friendly – Dynamic Sidebar Location (Genesis, Focus Theme)

This topic is: not resolved

This topic contains 1 reply, has 2 voices, and was last updated by  Lauren @ OnceCoupled 1 year, 7 months ago.

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
  • #102773


    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!

    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() ) {


    I do custom WordPress work!
    Contact me directly:

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.