$base_array = array(
'posts_per_page' => -1,
'fields' => 'ids',
'post_type' => 'cpt',
'post_status' => array('publish'),
'date_query' => array(
'before' => 'next Saturday',
'after' => 'last Monday'
),
'tax_query' => array(
'taxonomy' => 'pas_here_taxonomy'
'field' => 'slug',
'terms' => array( 'hardware', 'software'),
'operator' => 'IN'
)
);
$base = get_posts($base_array);
echo count($base);
Related Posts:
- Advanced search form with filters for custom taxonomies and custom fields
- Custom Post Type Category List & Post Count
- Taxonomy list. Order by a specific custom post type count
- Custom Meta Boxes – Nonce Issue – Move to trash issue
- Show metabox in custom-post-template depending on taxonomy term?
- Displaying Metabox value (custom post type taxonomy)
- get_queried_object error How to show post count by month in the taxonomy page
- How can I display my custom metaboxes on a custom post template?
- need advice on how to do a lists using custom post types – taxonomy vs postmeta
- Does WordPress limit the length of slug names for Post Meta or Terms?
- Query/list all terms and their custom post count
- How to duplicate entire custom post type
- Post count by month of taxonmy term
- Metabox not show in categories custom post type cmb2
- Display different information of a custom post type
- Filter posts by tax (dropdown) and meta value
- how to show records that don’t have custom meta value
- I am trying to get cutom post cout by month of current taxonmy term
- how to count the current posts terms
- How to count other posts not having specific taxonomy terms?
- best way to use custom taxonomy, post type and meta in a job system
- WordPress CPT Taxonomy Dashboard Search – How to include taxonomy in search?
- Custom Post Type meta data getting deleted on bulk editing taxonomies
- Should I use a custom taxonomy or custom post type for grouping a list of panels associated with a group of tests?
- display post count in archive page that have relation with another taxonomy term
- get_queried_object not work in taxonomy page
- How to show custom post count in archive page
- Saving Child Terms on front end not setting parent
- Order posts by meta value hiding posts instead of re-ordering
- Complex strcuture as CPT or taxonomy for use in woocommerce product variations [closed]
- WordPress custom post type
- Values inside a custom field to determine which category posts to display
- Timetable of Custom Meta Data using Custom Post Type and Custom Taxonomy
- Advanced search form with filters for custom taxonomies and custom fields
- Automatically add custom taxonomy when meta value gets to a set number or beyond
- Complex Custom Loop with Includes
- Get terms by taxonomy AND post_type
- Permalink Structure for Multiple Post Type Archives by Taxonomy
- How can I filter posts by post_parent in the admin?
- Get Custom Taxonomy ID within loop
- Custom Post Types not showing on Custom Taxonomy archive page
- custom post type or taxonomy
- How to setup a Custom Taxonomy Term template
- Search everything (posts, pages, tags, cpt, meta)
- Admin to user notices – best practices?
- Retrieve a specific field from taxonomy term through advanced custom fields [closed]
- front end radio custom taxonomy with custom post type
- Can’t sort order of wp_query with 2 meta keys
- How to get source of custom meta image?
- Bulk 301 redirect for custom post type
- Displaying Meta Box Image
- Get count of custom post type created by current user
- ‘category__and’ for custom taxonomy?
- Custom post query by taxonomy
- Custom Permalink with Dynamic Taxonomy for Custom Post Type – Works, but breaks other permalinks
- How can I show recent posts from same taxonomy as the post currently being viewed?
- Only show posts from a certain category?
- List Post Title by Last Word Then Second Last
- Custom meta box data array: foreach not working correctly?
- How to check if user meta field is empty in conditional else statement
- Customize Query for post
- Display post as term id
- How to filter wp_list_categories output with some custom post type meta query?
- Removing custom post type slug from URL
- Advanced search form with filters for custom taxonomies
- Why cant I add a custom post type to a custom taxonomy?
- Show Custom Taxonomy title in loop
- WP the_posts() on single-cars.php get category link
- tax_query not working in template
- Custom Post Type Dilema – How do I categorise by country?
- Submitting Custom Post Types with custom fields from Front-end form
- Publish and save specific postmeta to a filtered post_type
- Can I query posts by taxonomy conditionally based on post type?
- Which file/template is in charge of taxonomies for custom post types?
- Include custom post type custom taxonomies in Categories widget
- Save CTP post meta different values each day without overwriting previous values
- Changing CPT slug and taxonomy already registered in parent theme
- Show post count number assigned to custom taxonomy
- Sanitaizing Select Optin For Custom Post Type Metabox in WP
- Check when the post type changes, and display content
- Loop and add Specific Categories and Products Images
- custom post archive URL is wrong
- Custom Post Type with Different Sets of Post Content?
- Add a class to a div if custom post type has specific terms?
- Custom post type paging return home page
- Custom taxonomy returns 404 even with saving permalinks
- WP_Query to display number of custom post type filtered (order by) taxonomy
- Where is get_post_meta value located?
- Custom post type shortcode with taxonomy attribute not working and no errors
- Custom post meta box as a sub form
- Custom post edit page permalink links to edit page rather than the post
- Custom meta box data not saving
- Show tags of custom post types in WordPress
- Query Pulling the same post twice
- Render custom taxonomy query as single template
- Custom meta-box for all custom post types
- Listing all custom post types using a specific term on the said term’s template page, in groups
- Require Custom Taxonomy for Custom Type
- Save post_parent in a custom post type
- Permalinks for Custom Post Types and Taxonomies