How to get immediate children of a ‘term’ parent id through ‘get_terms’?
You’ve set number to 0, so it will do as told and return 0 terms. Remove the number argument if you want all matching terms.
You’ve set number to 0, so it will do as told and return 0 terms. Remove the number argument if you want all matching terms.
Subcategories randomly not working after page/post/category edit in wordpress. Fix: saving permalinks twice
You can do this by using the pre_get_posts filter, which allows you to change they query before it is executed. In this way you can add Cat A to any request for categories. Like this: add_filter (‘pre_get_posts’, ‘wpse380282_add_cat_a’); function wpse380282_add_cat_a ($query) { // do this only on the front end for the main query if … Read more
Taxonomy custom check box meta field not getting saved
If there is no description disabled in the theme settings, then you will have to edit the template files. This description is displayed in the title tag of the link, and you need to look for the category_description () function in the files. If you find it, you can just comment it out.
If you just want to count the total number of posts that matched a specific query, then there’s no need to set the posts_per_page to -1. Just set it to 1 instead. And $count_posts->count returns null because the WP_Query class doesn’t have a property named $count, i.e. WP_Query::$count does not exist. WP_Query does have $post_count … Read more
This code works perfect. Note that 137 is the category ID that I wish to hide and .home is the page where I don’t want it to be displayed .home .entry-category-item-137 { display: none; }
How to make product image inherit from category image
How to set the same base url for two different taxonomies?
Sometimes you don’t realize that built-in features exist, even when you’re a veteran user. I had overlooked that categories have a sidebar choice feature. No wonder nobody answered.