Tagged: x
-
AuthorPosts
-
May 13, 2016 at 5:01 pm #990374
alexdigitalParticipantHi,
How can i add a sidebar to the shop pages when the global site setting if full width?
Thanks in advance.
-Alex
May 13, 2016 at 10:29 pm #990786
Prasant RaiModeratorHello Alex,
Thanks for writing in!
Please follow the instructions to display sidebar in shop page:
1) Open your shop page and assign Content Left and Sidebar Right template. (You can choose any template as per requirement.)
2) Next navigate to Appearance > Sidebar and create a new sidebar. After that open the newly created sidebar and click on Enable sidebar on shop index page. Click on Update Sidebar button.
3) Go to Appearance > Widget and place required widgets in newly created sidebar.
Let us know how it goes.
Thanks.
May 17, 2016 at 3:33 pm #996095
alexdigitalParticipantThis reply has been marked as private.May 17, 2016 at 9:07 pm #996593
DarshanaModeratorHi there,
It seems like you have forgotten to include your site URL. Once we have that, we will check into your issue.
Thanks!
May 18, 2016 at 10:57 am #997585
alexdigitalParticipantMay 18, 2016 at 3:25 pm #998058
JadeModeratorHi Alex,
Thanks for the link.
It can be achieved by template change, to do so, follow these instructions:
Step 1: Copy the file wp-content/themes/x/framework/views/integrity/wp-sidebar.php in your child theme’s folder /framework/views/integrity/, open it in a text editor and replace the following line of code (probably line # 11):
<?php if ( x_get_content_layout() != 'full-width' ) : ?>Width following:
<?php if ( x_get_content_layout() != 'full-width' || ( is_shop() || is_product_category() || is_product_tag() ) ) : ?>Step 2: Add following code in your child theme’s functions.php file:
// Main Content Class // ============================================================================= if ( ! function_exists( 'x_main_content_class' ) ) : function x_main_content_class() { switch ( x_get_content_layout() ) { case 'content-sidebar' : $output = 'x-main left'; break; case 'sidebar-content' : $output = 'x-main right'; break; case 'full-width' : $output = 'x-main full'; break; } if ( is_shop() || is_product_category() || is_product_tag() ) { $output = 'x-main left'; } echo $output; } add_action( 'customize_save', 'x_main_content_class' ); endif; // Sidebar Class // ============================================================================= if ( ! function_exists( 'x_sidebar_class' ) ) : function x_sidebar_class() { switch ( x_get_content_layout() ) { case 'content-sidebar' : $output = 'x-sidebar right'; break; case 'sidebar-content' : $output = 'x-sidebar left'; break; default : $output = 'x-sidebar right'; } if ( is_shop() || is_product_category() || is_product_tag() ) { $output = 'x-sidebar right'; } echo $output; } add_action( 'customize_save', 'x_sidebar_class' ); endif;Step 3: That’s it!
Now, no matter which layout you choose in the Customizer, the sidebar will always be visible on Shop index, category and tag archive pages (Content Left, Sidebar Right).
If you are still having troubles on making this work kindly provide us with your FTP details.
Thank you.
May 31, 2016 at 5:12 pm #1018910
alexdigitalParticipantThanks!
Worked a treat.
-Alex
May 31, 2016 at 5:31 pm #1018941
alexdigitalParticipantHi,
I’ve just noticed it’s ok on the shop page, but not categories.
Any ideas?
-Alex
May 31, 2016 at 6:00 pm #1018969
John EzraMemberYou’re most welcome!
June 1, 2016 at 3:06 am #1019567
alexdigitalParticipantdid you see my other comment?
June 1, 2016 at 3:15 am #1019583
ChristopherModeratorHi there,
Sidebar is displaying in archive page too.
You just need to check the boxes for taxonomies under Appearance -> Sidebar -> custom sidebar.
Thanks.
-
AuthorPosts
- <script> jQuery(function($){ $("#no-reply-990374 .bbp-template-notice, .bbp-no-topic .bbp-template-notice").removeClass('bbp-template-notice'); }); </script>
