As far as I remember counts for terms are stored in database, so there is nothing to modify when you fetch them – you simply get ready-made numbers.
So you will either need to implement and maintain your special logic for counts completely separately or try to recalculate and modify native counts, see wp_update_term_count_now()
.
Related Posts:
- Homepage’s content is dependent on the custom field values (set automatically), how do I get homepage to update without manually updating page?
- what is the correct way to compare dates in a WP query_posts meta_query
- How to get post content by calling ajax?
- How to show all posts of the category in wordpress?
- Get the ID of the latest post
- Using meta_query, how can i filter by a custom field and order by another one?
- Return all custom meta data for one custom post type
- Enable sticky posts to custom post_type
- How to filter custom posts by tags and custom fields?
- How can I add a column/s to wp_posts table?
- Display Custom Post Type Fields
- Limit the post for differents custom post type in the same wp_query
- order by meta_value serialized array
- Loading post content in FancyBox
- Query post types with multiple keys
- ascending order custom post type
- add_meta_box: Datepicker like the one for postdate?
- Multiple information using custom post type
- Get all posts WHERE custom_field is LIKE value
- Quickest way to get last or oldest post date – WP Query
- Display custom post types with custom date field value (before today) & order by custom date field
- Before Delete Post
- How to use custom fields to enable sticky posts on custom post types?
- How to filter the taxonomy terms based on another taxonomy term
- How to insert content from another Custom Post type into Post?
- Adding dropdown select meta box to custom post type – seems restAPI is interfering
- Display only one post each WEEK
- List children on child post
- Get latest 3 posts from multiple CPT in one query
- Which post does a taxonomy term belongs to?
- Update Post Meta for a logged in user
- Add custom field to Posts and sort by it
- Two Custom Post Types Many to Many Relationship
- Custom fields (wp_post_meta) vs Custom Table for large amount of data
- How to integrate a form (Ninja Form or Contact Form 7) with Custom Post Types?
- Limit the post for differents custom post type in the same wp_query
- Listing all term items alphabetically / sorting loop
- Custom query – get_the_terms not work
- How to Display Posts From Category Within a Custom Taxonomy?
- Get_the_terms restrict output
- Modify Posts from Custom_Post_Type within the plugin
- Best way to create a search for custom post type by custom field values
- Incorrect ordering of custom post type based on time
- List all posts in taxonomy term
- Custom Taxonomy dont save in a frontend form for post a custom post
- Display Posts Query with IF function
- Making a form for user to add new custom post with custom taxonomies and custom fields
- Front-end Image Upload to Custom Meta Box
- Checking for custom field in admin pages
- A sports wordpress website
- WP query_posts group by meta field related
- Display custom post front end filter by ACF equals current user
- How to display custom field in product description?
- Create a post automatically if search result has zero results
- Show posts from WP Custom Post Type selected from a field in a metabox
- minimize wp_query call to database
- Display title of all custom posts from same taxonomy term on a custom post template
- Use WP pagination functions on a custom page template
- How to get all posts related to a taxonomy?
- WP_posts (Not meta) extra custom field column show and change it in a custom post type
- update a posts of other custom post type
- Filter By Term Not Working – Custom Post Type
- How to set class to “current-page” on the currently viewed single post within a CPT
- Custom Post Status & Taxonomies
- Calling specific page with wp query
- How to get Last post Id of custom post type in wordpress
- query_post causes the posts to be loaded twice on load more posts
- Query Distinct Taxonomies of Custom Post Type
- Query Posts From Multiple Post Types
- custom field suit new post with in custom fields
- WP Build-In Post selector for CPT
- How to grab data (titles, thumbnails and custom fields) from multiple posts to populate a new array efficiently?
- Display ACF object field data using Elementor Custom Query
- Display code if title of the custom post matches title of other post
- Sorting a query by custom field date
- post count is wrong when using same taxonomy for 2 different CPT
- Order custom posts by a date metabox
- Missing the first 6 Posts and displaying posts that are after the latest 6
- Adding Custom Taxonomy to WordPress default Post type
- Conditional to modify query results
- Two near-identical custom field types – one works, the other doesn’t . What can cause this?
- How do I do this with WordPress? Taxonomies?
- Page template with different page and post content
- Display Ad on Specific Categories
- Custom setting to show or hide field
- Integrate Custom Post Type Events into Calendar
- BBPress Search results in WordPress search
- Displaying custom-taxonomy-terms sorted by parent/child-hierarchy?
- How to get a custom field value of a custom post?
- Redirect to another page using contact form 7? [closed]
- Multiple single templates?
- How to set the mainpage of a custom post type?
- How can I output WPAlchemy repeating fields meta values in my page template?
- How to mass get post editor URLs
- How can I group by Taxonomy on Custom Post Type while filtering out based on custom Meta
- subtracting the current post form then whole loop, which is generating all CPT titles
- Custom Post Type used for FAQs Accordion
- 404 on Pages for Custom Post Type & Query_Posts
- Can I set a CPT title field to a dropdown with preset options if user is of a given type?
- Sort ACF by custom taxonomy