Tagged: x
-
AuthorPosts
-
July 19, 2016 at 3:42 am #1093135
johankridihParticipantHi
I am using stack Integrity, and Woocommerce.
I have under Apperacen – sidebar created two different sidebars. One for the Shop, and one for the Blog.
But under X-theme Customizer I can only see the main “Sidebar”. And that is also the only one showing up if I assign it content.How can I get my custom sidebars to show up on the pages I want?
Thank you!
Johan
July 19, 2016 at 4:00 am #1093154
ChristopherModeratorHi there,
Sidebars don’t appear in customizer. You should assign sidebar under Appearance -> Sidebars, see the attachment.
Hope it helps.
July 19, 2016 at 5:30 am #1093243
johankridihParticipantI had forgotten those check boxes! Worked great! Thx!
Johan
July 19, 2016 at 6:46 am #1093313
ThaiModeratorIf you need anything else please let us know.
September 27, 2016 at 3:11 pm #1192850
johankridihParticipantHi, new challenge related to this.
I have the sidebare for the shop page and the blog archive page. Thats working fine!
I tag my Blog posts with a category called “Nyheter” (News in norwegian). And I have set in that sidebar setting that I want a sidebar on the taxonomy “Nyheter”. But it wont show up. I have made a sidebar also for the Woocommerce pages where this method does work. So it workes on page, just not blog posts.
Am I missing something?
Thanks!
Johan
September 28, 2016 at 12:26 am #1193424
Paul RModeratorHi Johan,
By checking “Nyheter”, it means it will activate the sidebar on Nyheter archive page but not on all posts that is under Nyheter.
You need to check the posts individually in your sidebar options.
For a workaround, you can try adding this in your child theme’s functions.php file(wp-content/themes/x-child/functions.php)
add_filter( 'ups_sidebar', 'fix_category_sidebar' ); function fix_category_sidebar($default_sidebar ) { $categories = get_the_category(); $post_categories = array(); if(is_array($categories)) { foreach ( $categories as $category ) { $post_categories[] = $category->term_id; } } $sidebars = get_option( 'ups_sidebars' ); if(is_array($sidebars)){ foreach ( $sidebars as $id => $sidebar ) { if(isset($sidebar['taxonomies']) && is_array($sidebar['taxonomies'])){ foreach($sidebar['taxonomies'] as $t_id => $tax) { if(in_array($t_id,$post_categories)) { return $id; } } } } } return $default_sidebar ; }Hope that helps.
September 28, 2016 at 8:13 am #1193882
johankridihParticipantThat worked!!
Dont know how, but it works!
Thank you!
September 28, 2016 at 9:09 am #1193961
ThaiModeratorGlad it worked 🙂
If you need anything else please let us know.
-
AuthorPosts
- <script> jQuery(function($){ $("#no-reply-1093135 .bbp-template-notice, .bbp-no-topic .bbp-template-notice").removeClass('bbp-template-notice'); }); </script>
