Tagged: x
-
AuthorPosts
-
February 2, 2017 at 3:58 am #1354990
Peter FaeParticipanthey. I want to exclude certain categories from the category dropdown, but still have access to it through the Posts – Categories dashboard. Basically, I have an ‘Under Construction’ category for myself but don’t want my readers to see that.
thanks!
February 2, 2017 at 6:02 am #1355090
ChristianModeratorHey Peter,
Please give us the URL of the page where we can find your category dropdown. Also provide a screenshot.
Thanks.
February 2, 2017 at 9:47 pm #1356233
Peter FaeParticipantFebruary 3, 2017 at 1:17 am #1356393
LelyModeratorHello Peter,
Please add the following code on your child theme’s functions.php file.
//Hide categories from WordPress category widget function exclude_widget_categories($args){ $exclude = "1,2,3,4"; $args["exclude"] = $exclude; return $args; } add_filter("widget_categories_args","exclude_widget_categories");Replace “1,2,3,4” with your own category IDs.
Hope this helps.
February 8, 2017 at 12:44 am #1362396
Peter FaeParticipantFebruary 8, 2017 at 3:20 am #1362527
ChristopherModeratorHi there,
Please add following code in Customize -> Custom -> Global CSS :
.widget_categories option.level-0[value="279"] { display: none; }Hope that helps.
February 10, 2017 at 1:01 am #1365549
Peter FaeParticipantdo I also need to add the code to the functions component of my child theme or leave that out?
February 10, 2017 at 1:03 am #1365552
Peter FaeParticipantalso … not working.
February 10, 2017 at 2:55 am #1365642
LelyModeratorHi Peter,
Look for this part:
/* .page-id-3583 .x-post-carousel { display: none; }Update to this:
.page-id-3583 .x-post-carousel { display: none; }/* */That is a syntax for multiple line comments. Please make sure that everything has closing./*will look for the closing tag for comment thus will make CSS after that from working. Check other parts to for any error.Hope this helps.
-
AuthorPosts
- <script> jQuery(function($){ $("#no-reply-1354990 .bbp-template-notice, .bbp-no-topic .bbp-template-notice").removeClass('bbp-template-notice'); }); </script>
