Sometimes you may need to hide certain tags and categories from your widgets. In this post, I will explain you how to filter out unwanted terms using WordPress filters.
First open your
functions.php file in your theme folder. This is the main script file where we can add our customizations.
Now add this block of code in your functions file:
After you add the code, you should change the id list, so it will exclude correct categories or tags from your widgets.
Remember to SAVE and UPLOAD your file after you edit it. Now your widgets will automatically exclude those terms.
Hope you enjoyed it.