Try getting rid of the “0” key in your tax_query and meta_query array.
$query_args = array(
'post_type' => 'post',
'post_status' => 'publish',
'order' => 'ASC',
'orderby' => 'none',
'posts_per_page' => '100',
'offset' => '2',
'page' => '2',
'tax_query' => array(
array(
'taxonomy' => 'post_tag',
'field' => 'name',
'terms' => array('test'),
'operator' => 'IN',
),
'relation' => 'OR',
),
'meta_query' => array(
array(
'key' => 'post_title',
'value' => 'test',
'compare' => 'LIKE',
),
'relation' => 'OR',
),
Also in your first set of args you have 'category' => 42
, but this should be 'cat' => 42
,
Related Posts:
- How can I get all posts data from within a paginated search result?
- Search query – exact post title match
- Should we trust the post globals?
- Search Custom Post Type Pages and Custom Fields in 2 Dropdowns?
- How to know if get_posts() failed?
- Duplicate posts
- Looping through posts per category gives same posts for each category
- How to show posts rank based on custom field value
- how to hide specific post from google search
- How do I create Comma Separated list of attached image ids?
- Search widget breaks when using multiple loops?
- Should ‘setup_postdata()’ be reset with ‘wp_reset_postdata()’?
- pagination hook doesn’t work with search results
- Check if post exists
- posts_per_page doesnt work
- Sorting posts according to view counts not working
- Search for posts based on their url in the admin?
- Only display posts after current date
- wp_query ‘s’ parameter does not work with custom post type
- Improving WP_Query for performance when random posts are ordered
- Private Posts/Pages & Search
- WP_Query Authors OR Categories
- do_shortcode within post query
- Query get post,how to add comment box
- Search results posts_orderby and ID
- get query() without post content?
- How can I setup a relationship using categories in WordPress?
- Exclude the first ‘n’ number of posts of a tag from home page?
- posts_per_page option limits the number of Gallery items
- How i can limit period of post publication?
- How do I change the core post search algorithm? Where is it found/constructed?
- Exclude current custom post on single post
- Dynamically switch template on click
- Get all custom post types excepted some…
- Get all comments of author’s posts
- Why Query is returning empty array?
- Inner join overrides Advanced Custom Fields plugin’s get_field [closed]
- meta_value timestamp older than now
- Counter is skipping post when I still want it visible [closed]
- Do not show children of a category
- How to get all post_parents of a post?
- Query for first 3 posts to change the look and feel
- Total number of posts in query (category/tag/author/search results/main page…)
- Query posts and filter at query time by value of custom meta
- Run query_posts if SESSION is empty?
- Very complex post query
- Delete post revisions only for a single post
- See if a post has a specified tag
- How to give classname to post if post has no content?
- Exclude some posts from displaying in wp_query based on some condition
- How to retrieve certain number of images from a wordpress post?
- How to convert query sql to shortcode in wordpress?
- Some doubts about how the loop work (trying debugging it)
- Why does WordPress search returns same number of results for every search query?
- Adjust the order for returned posts
- get last post’s link with SQL query
- Trim posts from WP-Query?
- Trying to exclude custom posts based on date, while sorting by custom field
- how to add tags to post in the Loop?
- Merge get_comments & get_posts into a single query
- How to optimize posts query in wordpress
- search form for custom fields
- How to fetch courses in all languages in WordPress?
- How to show only homepage in google results instead of privacy, contact pages
- Need to display a Jan 1st post as the site’s front page on Jan 1st, and Jan 2nd post as front page on Jan 2nd etc
- I have two post types in the same query, how can I use CSS to select only one post type?
- On WordPress Search, how to search post from Author meta also
- filter posts based on menu_order
- Bulk Post update_post_meta
- Show 5 posts and than 3 posts offset with pagination
- I need some explanation on global $post [duplicate]
- How to hide meta from search result only on pages?
- How to delete all posts with dead image urls?
- Numbering author posts in posts query
- How to run select query of post with category and tags?
- Querying posts from current category, using a variable as array argument
- Query posts from newest category
- Custom author search
- Display result of custom form
- wp query custom orderby not custom field
- Custom Select Query pagination not working properly
- Query post by meta key of another table
- Sort / Filter Queries
- Display the latest post from some selected authors
- Ordering posts alphabetically by meta keys and title
- Why I have this strange behavior when I try to exlude the featured post from posts visualization?
- Grab next post title in archive page
- Continuous listing from a custom field
- Displaying Results From Custom Taxonomy Query
- How to store post rating system data post independent?
- Get first comment link on the post itself
- How can i retrive the movies, trailers, news in a single page using search
- Make division in post_query?
- How to limit post query to only return a total count of items with certain post statuses?
- Related posts by searching post tags of single post as terms
- Display one post randomly from category on home page
- Need to show birthday of custom post type(Famous people in this case) in elementor. Date of birth set in custom fields
- Display posts with id equal to relationship value
- Sort Posts Alphabetically Based on Specific Category (Divi)
- Change permalinks in posts via SQL