Tagged: x
-
AuthorPosts
-
September 26, 2016 at 2:29 pm #1191290
jonesy2367ParticipantHi
My sidebars in specific categories are no longer working. I set up a test category and test sidebar but can’t seem to make it work
could you advise?
many thanks
September 26, 2016 at 2:55 pm #1191323
RahulModeratorThanks for writing in! To assist you with this issue, we’ll first need you to provide us with your URL. This is to ensure that we can provide you with a tailored answer to your situation. Once you have provided us with your URL, we will be happy to assist you with everything.
September 26, 2016 at 3:09 pm #1191339
jonesy2367ParticipantThis reply has been marked as private.September 26, 2016 at 3:15 pm #1191344
jonesy2367Participanthere’s a screenshot of the sidebar settings..
September 26, 2016 at 3:40 pm #1191379
jonesy2367ParticipantHi – i could get the ‘test sidebar’ to appear on a page but it just doesn’t seem to work on a post?
September 27, 2016 at 12:21 am #1191789
Paul RModeratorHi,
Would you mind providing us with login credentials so we can take a closer look? To do this, you can make a post with the following info:
– Link to your site
– WordPress Admin username / password
– FTP credentialsDon’t forget to select Set as private reply. This ensures your information is only visible to our staff.
September 27, 2016 at 4:26 am #1191955
jonesy2367ParticipantThis reply has been marked as private.September 27, 2016 at 5:17 am #1192007
Paul RModeratorHi,
You can try adding this in your child theme’s functions.php file.
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 4:57 am #1193639
jonesy2367Participantwonderful that’s worked a treat
thanks very much 🙂
September 28, 2016 at 5:49 am #1193676
ThaiModeratorYou’re most welcome 🙂
-
AuthorPosts
- <script> jQuery(function($){ $("#no-reply-1191290 .bbp-template-notice, .bbp-no-topic .bbp-template-notice").removeClass('bbp-template-notice'); }); </script>
