Tagged: x
-
AuthorPosts
-
September 20, 2016 at 9:29 pm #1184101
inlifestyleParticipanti placed that code and it didnt work. I tried creating a few test posts with categories and sidebars setup. Can you take a look?
Thanks!
September 21, 2016 at 4:39 am #1184363
Paul RModeratorIn that case, please provide us your ftp login in private reply.
Thanks
September 22, 2016 at 5:20 pm #1187072
inlifestyleParticipantThis reply has been marked as private.September 23, 2016 at 12:32 am #1187521
RadModeratorHi there,
Would you mind providing your admin login credentials as well? The login you provided redirects to a member dashboard.
Thanks!
September 23, 2016 at 9:10 am #1187935
inlifestyleParticipantThis reply has been marked as private.September 23, 2016 at 5:55 pm #1188444
RadModeratorHi there,
It still the same, it won’t allow me to access the admin dashboard. It redirects me to different URL of the member dashboard.
Is there any special procedure?
Thanks!
September 27, 2016 at 10:03 am #1192403
inlifestyleParticipantThis reply has been marked as private.September 27, 2016 at 8:09 pm #1193224
LelyModeratorHi There,
I am able to login and check. As stated on the thread:
With this customization, it will allow you to set your custom sidebar per category. You may add or edit your category at Admin > Posts > Categories and set your sidebar. If there is no sidebar, then it will use main sidebar. Please also note that if your items has multiple category, then it will pickup the last category and use its sidebar. See attached screenshot on how to select category.
September 29, 2016 at 9:56 am #1195820
inlifestyleParticipantThis reply has been marked as private.September 29, 2016 at 3:52 pm #1196340
RadModeratorHi there,
That post has multiple categories, and it’s not possible to have multiple sidebars on the same page as well. Hence, by default, it will only pick the sidebar from the first category assigned to it. It happens to be the Compliance category ( http://dmec.org/wordpress/wp-admin/term.php?taxonomy=category&tag_ID=150&post_type=post ). And it the assigned sidebar is set to default (Main Sidebar) which is empty.
Please assig a different sidebar for Compliance category.
Make sure the sidebar is implemented on the front as well, like from here https://community.theme.co/forums/topic/create-sidebar-for-post-category/page/3/#post-244194
Thanks!
September 29, 2016 at 4:20 pm #1196368
inlifestyleParticipantI added that code into the functions.php file when this first started.
I did however assign a category for the compliance category and still nothing….Am i missing something on that thread?
September 29, 2016 at 10:07 pm #1196806
RadModeratorHi there,
I checked your files through FTP and the only implemented code is for the backend. It has another set of code to display it on the front end. Like from the last URL that I provided, it’s the same thread but just different page number. Please check the discussion 🙂
Thanks!
September 30, 2016 at 9:28 am #1197331
inlifestyleParticipantAre you referring to the wp-single.php? I added that code in and still nothing. Can you be more direct in what is needed it help us both out!
Thanks!
September 30, 2016 at 2:04 pm #1197693
inlifestyleParticipantI had to remove the wp-single.php file because it was causing a blank left sidebar….
September 30, 2016 at 6:34 pm #1197891
RadModeratorHi there,
It doesn’t need to be the wp-single.php, I added this code to your child theme’s functions.php
add_filter( 'ups_sidebar', 'ups_display_category_sidebar', 99 ); function ups_display_category_sidebar ( $sidebar ) { if ( is_singular( 'post' ) ) { $terms = get_the_terms( get_the_ID(), 'category' ); if ( isset( $terms ) && count( $terms ) > 0 ) { $term = array_pop( $terms ); $setting = get_option( "taxonomy_".$term->term_id ); $sidebar = $setting['category-sidebar']; } } return $sidebar; }And it will pick the sidebar from the very last category that is assigned to your post.
Cheers!
-
AuthorPosts
- <script> jQuery(function($){ $("#no-reply-1163391 .bbp-template-notice, .bbp-no-topic .bbp-template-notice").removeClass('bbp-template-notice'); }); </script>
