Your query has some odd elements like 'meta_value_num' => '',
but it sounds to me like what you want is exactly what category__and
does.
$my_query_args = array(
'posts_per_page' => 10,
'meta_key' => 'price',
'category__and' => array($catid1,$catid2),
'orderby' => 'meta_value_num',
'order' => 'asc'
);
Side note: your price
meta key will not order in a way that you think is correct unless the associated values actually are numbers.
Related Posts:
- How would I get a taxonomy/category list inside a Gutenberg block?
- Gutenberg editor add a custom category as wrapper for custom blocks
- Rewrite rule page url with category
- WP_Query not looking at child category
- Deleting default category in wordpress
- Excluding posts from a category but only if they’re not in multiple categories
- Most recent post from every category/taxonomy but sorted by date
- Category Archive, list subcategories of each post
- Showing all the posts in one page?
- How to order categories in Woocommerce that are spread over multiple pages? [closed]
- Script to duplicate categories as tags
- Check if post belongs to any category
- How to sort categories by id in wordpress admin
- How to override Category rendering mechanism
- Automatically add product_categories to nav_menu
- Can paginate_links() be customized for a specific category or tag?
- Add Product categories to WordPress menu without losing hierarchy
- Remove Parent Category from Child Category URL
- How to set up Author archives with sub category URL
- Allow users to post to a certain category
- How to change number of items on add new pluggins page from backend?
- Ignoring a category in WP_Query still shows the links in next_post_link()?
- Implementing a tricky wordpress menu (nested categories + thumbnails)
- Do I have to use categories?
- get_the_category and echo out link to child-most/deepest category
- Categorising posts/pages into years published
- How can I duplicate categories and tags?
- Display category description instead of “nothing found” page
- Subcategories with the same name
- Link Attachment Image to Category
- Modify WordPress SQL Query to pull from within a category
- Removing post category base giving Error 404
- posts_nav_link(); picks up index.php instead of category.php as template
- Category name field strips HTML tags. How can I reverse this?
- Get all media categories
- Custom SQL Query: Get all posts with category id and a concated list of tags on each post
- Add tag parameter to category.php
- Check IF category_description exists
- Related Tags not in category
- How to show a list of only categories (exclude subcategories)
- How to list categories in reverse alphabetical order?
- I want to show category name when using [category] shortcode
- Category list with postcount
- What Must to Display the “mysite.com/category” URL?
- How to hide some categories in dashboard
- How to choose the content from a post which is in the right category?
- How to display product with two condition, category and brand taxonomy
- List recent posts with link to first category
- How to get category id’s which are added in main menu?
- Link from navbar to categories
- Natural sort / ordering wp_dropdown_categories
- Make wp_dropdown_categories into a variable that persists until changed?
- show category in woocommerce
- Can I define multiple paginations on a single page?
- Echo Category Nicename
- Category sticky latest
- How can I exclude a category from the main loop with the category name & not ID?
- Explode() expects a string
- How to add meta description, keywords, custom title to a category template
- User level categories
- Exclude category from drop down list form
- how to remove alphabetical order of category in WordPress?
- How can i add service category here? [duplicate]
- How to exit out of delete_categories and stop action?
- Meta Query | Compare category name and meta value
- How to filter tags by category?
- Programmatically Create Category and sub Category and sub sub Category
- How Can I Display the Category Description in a Theme with no Category.php or Archive.php?
- How to create a table with counts of category combinations?
- How to get the_category(‘, ‘) with link “title” attribute
- product_cat image url from database
- WooCommerce – Get products from category right before deleting category
- omit categories from main navigation menu
- How to test if the post is in a primary category
- How to get the term id inside the start lvl method of category walker?
- Multiple if statements with else for get_the_category [closed]
- Most efficient way to display current post subcategories?
- How to relocate images
- Category next page link not working
- How to display the past events in one of the category?
- How to Query the Top 5 Posts of a specific category?
- How to add a post with new Taxonomy without assigning to default category?
- Page Type with Category Link
- Using wp_list_pages to create 2 lists of pages and include and exclude some of them depending on their category
- How to create default categories in new installs?
- If I change the taxonomy of a post will it get a new time stamp?
- Check if value is a custom taxonomy category name
- Tracking multiple tags or categories
- 2 loops in archive.php (one for each category)
- How to load jquery tag-it plugin into admin?
- not empty categories don’t show in menu [closed]
- How do I add and display a custom image field to a category? [duplicate]
- Show parent-child relationship for categories in the wordpress admin
- How to assign different categories to pages in wordpress?
- Category pagination not working in category.php please help me
- Print the associated categories of the current post starting with parent (with option to remove href)
- Add category image before post title on homepage
- How to link ACF relationship field to the new Query block in Full Site Editing
- Custom EndPoint not working when strip child category in URL
- How to add custom prefix before category base for category page URL?