• Skip to main content
  • Skip to primary sidebar
  • Business
  • WordPress
  • Security
  • Marketing
  • Publicity
  • Computing
  • Resources
  • Whatevs

Purely Wordpress

Just The Tech, News, and Info We Deem To Post

  • Home
  • About
  • Contact
  • Contribute
You are here: Home / Code Snippets / Genesis Sidebar-Content-Sidebar Layout Reversal

Genesis Sidebar-Content-Sidebar Layout Reversal

Genesis Theme Framework Code Snippets

Genesis Sidebar-Content-Sidebar Layout Reversal Part 1

// Change sidebar order on Sidebar-Content-Sidebar
add_action('genesis_after_header','change_sidebar_order');
function change_sidebar_order() {
   $site_layout = genesis_site_layout();
    if ( 'sidebar-content-sidebar' == $site_layout ) {
        remove_action( 'genesis_sidebar', 'genesis_do_sidebar' );
        remove_action( 'genesis_sidebar_alt', 'genesis_do_sidebar_alt' );
        add_action( 'genesis_sidebar', 'genesis_do_sidebar_alt' );
        add_action( 'genesis_sidebar_alt', 'genesis_do_sidebar' );
    }
}</pre>
Insert in your Child Themes style sheet
<pre class="">body.sidebar-content-sidebar #content-sidebar-wrap {
	width: 628px;
	margin: 0;
	padding: 0;
	float: right;
	}

body.sidebar-content-sidebar #sidebar {
	width: 130px;
	float: right;
	margin: 0;
	padding: 0;
	display: inline;
	}

body.sidebar-content-sidebar #sidebar .widget {
	background: #color;
	margin: 0 0 10px 0;
	padding: 10px;
	}

body.sidebar-content-sidebar #sidebar-alt {
	width: 310px;
	float: left;
	margin: 0;
	padding: 0;
	display: inline;
	}

body.sidebar-content-sidebar #sidebar-alt .widget {
	background: #color;
	margin: 0 0 10px 0;
	padding: 10px;
	}

Genesis Sidebar-Content-Sidebar Layout Reversal Part 2

<pre class="wp-block-code"><code>body.sidebar-content-sidebar #content-sidebar-wrap {
	width: 628px;
	margin: 0;
	padding: 0;
	float: right;
	}

body.sidebar-content-sidebar #sidebar {
	width: 130px;
	float: right;
	margin: 0;
	padding: 0;
	display: inline;
	}

body.sidebar-content-sidebar #sidebar .widget {
	background: #color;
	margin: 0 0 10px 0;
	padding: 10px;
	}

body.sidebar-content-sidebar #sidebar-alt {
	width: 310px;
	float: left;
	margin: 0;
	padding: 0;
	display: inline;
	}

body.sidebar-content-sidebar #sidebar-alt .widget {
	background: #color;
	margin: 0 0 10px 0;
	padding: 10px;
	}</code></pre>

by Jack Alltrade on August 16, 2018

Filed Under: Code Snippets Tagged With: Code, Genesis Child Theme, Genesis Framework, Layout

Reader Interactions

Share Your Two Cents Cancel reply

Your email address will not be published. Required fields are marked *

Primary Sidebar

Categories

  • Code Snippets
  • Development
  • File Management
  • Genesis Framework
  • Hosting
  • Legacy
  • Plugins
  • SEO
  • Tech Terms
  • Themes
  • User Experience
  • User Interface
  • WordPress Core
  • WordPress Functionality

Warning! Use at your own risk!

As always, use at your own risk and remember to backup your site prior to inserting new code.

© Copyright Jack Alltrade & Associates 2025 · Purely Supplemental™ is a trademark of Jack Alltrade & Associates