{"id":3680,"date":"2018-08-16T14:09:00","date_gmt":"2018-08-16T14:09:00","guid":{"rendered":"https:\/\/purelysupp.com\/wordpress\/?p=3680"},"modified":"2022-10-16T14:39:01","modified_gmt":"2022-10-16T14:39:01","slug":"genesis-sidebar-content-sidebar-layout-reversal","status":"publish","type":"post","link":"https:\/\/purelysupp.com\/wordpress\/code-snippets\/genesis-sidebar-content-sidebar-layout-reversal\/","title":{"rendered":"Genesis Sidebar-Content-Sidebar Layout Reversal"},"content":{"rendered":"\n<p><strong>Genesis Sidebar-Content-Sidebar Layout Reversal Part 1<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">\/\/ Change sidebar order on Sidebar-Content-Sidebar\nadd_action('genesis_after_header','change_sidebar_order');\nfunction change_sidebar_order() {\n   $site_layout = genesis_site_layout();\n    if ( 'sidebar-content-sidebar' == $site_layout ) {\n        remove_action( 'genesis_sidebar', 'genesis_do_sidebar' );\n        remove_action( 'genesis_sidebar_alt', 'genesis_do_sidebar_alt' );\n        add_action( 'genesis_sidebar', 'genesis_do_sidebar_alt' );\n        add_action( 'genesis_sidebar_alt', 'genesis_do_sidebar' );\n    }\n}&lt;\/pre&gt;\nInsert in your Child Themes style sheet\n&lt;pre class=\"\"&gt;body.sidebar-content-sidebar #content-sidebar-wrap {\n\twidth: 628px;\n\tmargin: 0;\n\tpadding: 0;\n\tfloat: right;\n\t}\n\nbody.sidebar-content-sidebar #sidebar {\n\twidth: 130px;\n\tfloat: right;\n\tmargin: 0;\n\tpadding: 0;\n\tdisplay: inline;\n\t}\n\nbody.sidebar-content-sidebar #sidebar .widget {\n\tbackground: #color;\n\tmargin: 0 0 10px 0;\n\tpadding: 10px;\n\t}\n\nbody.sidebar-content-sidebar #sidebar-alt {\n\twidth: 310px;\n\tfloat: left;\n\tmargin: 0;\n\tpadding: 0;\n\tdisplay: inline;\n\t}\n\nbody.sidebar-content-sidebar #sidebar-alt .widget {\n\tbackground: #color;\n\tmargin: 0 0 10px 0;\n\tpadding: 10px;\n\t}<\/pre>\n\n\n\n<p><strong>Genesis Sidebar-Content-Sidebar Layout Reversal Part 2<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>&lt;pre class=\"wp-block-code\">&lt;code>body.sidebar-content-sidebar #content-sidebar-wrap {\r\n\twidth: 628px;\r\n\tmargin: 0;\r\n\tpadding: 0;\r\n\tfloat: right;\r\n\t}\r\n\r\nbody.sidebar-content-sidebar #sidebar {\r\n\twidth: 130px;\r\n\tfloat: right;\r\n\tmargin: 0;\r\n\tpadding: 0;\r\n\tdisplay: inline;\r\n\t}\r\n\r\nbody.sidebar-content-sidebar #sidebar .widget {\r\n\tbackground: #color;\r\n\tmargin: 0 0 10px 0;\r\n\tpadding: 10px;\r\n\t}\r\n\r\nbody.sidebar-content-sidebar #sidebar-alt {\r\n\twidth: 310px;\r\n\tfloat: left;\r\n\tmargin: 0;\r\n\tpadding: 0;\r\n\tdisplay: inline;\r\n\t}\r\n\r\nbody.sidebar-content-sidebar #sidebar-alt .widget {\r\n\tbackground: #color;\r\n\tmargin: 0 0 10px 0;\r\n\tpadding: 10px;\r\n\t}&lt;\/code>&lt;\/pre><\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>Genesis Sidebar-Content-Sidebar Layout Reversal Part 1 \/\/ Change sidebar order on Sidebar-Content-Sidebar add_action(&#8216;genesis_after_header&#8217;,&#8217;change_sidebar_order&#8217;); function change_sidebar_order() { $site_layout = genesis_site_layout(); if ( &#8216;sidebar-content-sidebar&#8217; == $site_layout ) { remove_action( &#8216;genesis_sidebar&#8217;, &#8216;genesis_do_sidebar&#8217; ); remove_action( &#8216;genesis_sidebar_alt&#8217;, &#8216;genesis_do_sidebar_alt&#8217; ); add_action( &#8216;genesis_sidebar&#8217;, &#8216;genesis_do_sidebar_alt&#8217; ); add_action( &#8216;genesis_sidebar_alt&#8217;, &#8216;genesis_do_sidebar&#8217; ); } }&lt;\/pre&gt; Insert in your Child Themes style sheet &lt;pre class=&#8221;&#8221;&gt;body.sidebar-content-sidebar #content-sidebar-wrap {\u2026&nbsp;<a href=\"https:\/\/purelysupp.com\/wordpress\/code-snippets\/genesis-sidebar-content-sidebar-layout-reversal\/\" class=\"rmlink\">Read More<\/a><\/p>\n","protected":false},"author":1,"featured_media":10674,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_genesis_hide_title":false,"_genesis_hide_breadcrumbs":false,"_genesis_hide_singular_image":false,"_genesis_hide_footer_widgets":false,"_genesis_custom_body_class":"","_genesis_custom_post_class":"","_genesis_layout":"","iawp_total_views":8,"wds_primary_category":56,"footnotes":""},"categories":[56],"tags":[110,228,64,83],"class_list":{"0":"post-3680","1":"post","2":"type-post","3":"status-publish","4":"format-standard","5":"has-post-thumbnail","7":"category-code-snippets","8":"tag-code","9":"tag-genesis-child-theme","10":"tag-genesis-framework","11":"tag-layout","12":"entry"},"featured_image_src":"https:\/\/purelysupp.com\/wordpress\/wp-content\/uploads\/sites\/2\/2022\/09\/Genesis-Code-Snippets-600x400.jpg","featured_image_src_square":"https:\/\/purelysupp.com\/wordpress\/wp-content\/uploads\/sites\/2\/2022\/09\/Genesis-Code-Snippets-600x515.jpg","author_info":{"display_name":"Jack Alltrade","author_link":"https:\/\/purelysupp.com\/wordpress\/author\/jacka11trade\/"},"_links":{"self":[{"href":"https:\/\/purelysupp.com\/wordpress\/wp-json\/wp\/v2\/posts\/3680","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/purelysupp.com\/wordpress\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/purelysupp.com\/wordpress\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/purelysupp.com\/wordpress\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/purelysupp.com\/wordpress\/wp-json\/wp\/v2\/comments?post=3680"}],"version-history":[{"count":2,"href":"https:\/\/purelysupp.com\/wordpress\/wp-json\/wp\/v2\/posts\/3680\/revisions"}],"predecessor-version":[{"id":10704,"href":"https:\/\/purelysupp.com\/wordpress\/wp-json\/wp\/v2\/posts\/3680\/revisions\/10704"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/purelysupp.com\/wordpress\/wp-json\/wp\/v2\/media\/10674"}],"wp:attachment":[{"href":"https:\/\/purelysupp.com\/wordpress\/wp-json\/wp\/v2\/media?parent=3680"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/purelysupp.com\/wordpress\/wp-json\/wp\/v2\/categories?post=3680"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/purelysupp.com\/wordpress\/wp-json\/wp\/v2\/tags?post=3680"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}