get_term_by returns an object, try passing $term->slug to your query instead.
Related Posts:
- Different ‘posts_per_page’ setting for first, and rest of the paginated pages?
- WP Cron and wp_insert_post
- How to adjust found_posts so that it accounts for offset and pagination
- WP Query with offset breaks wp_pagenavi or any pagination
- Exclude first 5 posts of specific categories in the main loop
- Offset Page Loops and Pagination
- How to use offset in WP_Query
- How can I fix: “Notice: Undefined offset: 0”?
- WP_Query, pre_get_posts and offset
- WP_Query with offset and ‘orderby’ => ‘rand’, offset not working
- How do I rewrite this loop as a new WP_Query style-loop?
- WP_Query arguments order
- Config.php issue in WordPress
- WP_Query – Adding “offset” posts to the end of the loop
- Stomping WP_Query in author archive to facilitate pagination with custom queries
- Apply query arguments after the nth post
- AJAX Breaking Offset Argument In WP Query
- Page navigation doesn’t seem to work when I add offset?
- WP_Query offset is returning post from prevois loop
- Notice thrown when creating numeric pagination on custom query
- Offset WP_Query by negative 1
- Error: Attempt to read property “ID” on null
- setting offset to category number in archive page
- I removed the “wp_rm_logs” table and am constantly getting this error
- Using something else instead of using 9 wp_query
- Featured Image as Background with Offset
- WordPress WP_Query offset parameter not working with search parameter
- Memory size exhausted when extending WP_Query
- Multiple WP_Query with pagination shows Page/2 content on the remaining pages
- How to force a query conditional?
- WP_Query: Exclude hidden products from WooCommerce product list
- Conditional arguments for WP_Query and tax_query depending on if $somevar has a value
- How to get order of posts?
- Combining two wordpress queries with pagination is not working
- query to find “parent” posts of CPT A while filtering “child” posts of CPT B
- Get Recent Posts by Date in Multisite
- Executing Queries in tag.php
- next_posts_link not working for loop called with ajax
- author.php with ACF and CPTs
- WP_Query using meta_query with relation OR and orderby meta_value doesn’t work
- Identify which loop you are hooking into; primary or secondary?
- tax_query in WP_Query problem
- Display posts from Last 24 hours and order them based on most views
- Query with pre_get_posts to get pagination
- Trying to list out child pages with WP_Query
- Pagination is not working using WP_Query
- view queries made?
- Filter and list posts of a custom taxonomy
- How to detect custom query inside `posts_where` hook?
- Is temporarily overwriting $wp_query a bad idea?
- Array Chunks and Inserting Varying HTML in WP_Query
- Filter user list that meta_value is empty
- Query wp_usermeta alongside wp_users
- Understanding the use of wp_reset_query();
- How to output different posts per page?
- Multiple WP_Query loops with Pagination Not Working
- WordPress posts per page WP_Query
- WordPress WP_Query orderby being overwritten
- Multiple meta queries but arrange by specific meta value order
- WooCommerce Only OnSale Products Loop Snippet [closed]
- Modifying the Search Results
- WP_Query times out
- ACF – Get lowest & highest value from field
- What format does the meta_query TIME type require?
- How to find a post id using the post_excerpt?
- wp_query add arguments using array_push if variable met
- tax_query: Order by slug?
- WP_Query date_query – Use unix timestamp?
- WP_Query filter and order by meta ordering by wrong joined table
- WP_Query last five posts, simply ordered by meta_value
- How to display specific posts with WP_Query?
- WP_Query “OR”: Find posts by ID, Name or Post Title?
- What is the random string I am seeing when I use get_query_var?
- Querying on multiple taxonomies pulled from $_GET checkbox array not working?
- How to get all child pages in their parent page?
- Querying A Post That Includes Two Taxonomies Using JSON Rest API
- WP_Query condition affects posts_per_page count
- WP_Query order result by date AND meta_value
- How to display summary content from a Page (Not a Post) on another page
- Custom Search Not Consistent with Results
- Order by title without taking into account ‘the’
- Set global $wp_query/$post variable for dynamic page generation
- Display tags with random thumbnail from selection of posts with that tag
- Is there a way to work with a specific the_field from an already queried post? [closed]
- slow WP_Query for non-admin user
- Changing sort order for presentation by Jetpack infinite scroll
- How to search for posts given post_content AND post_excerpt using WP_Query?
- Add capabilities via plugin for another plugin
- Two loops on archive page
- Meta Queries – should nesting work after WP 4.1?
- Filter and Order by Multiple Custom Meta Values
- Meta Query relation “AND” then set array accordingly
- How to get posts that have certain meta key value and order based on another meta key’s value
- How to cache wordpress get_posts query using transients?
- Orderby meta _value that is saved as an array
- Unexpected number of loops in while
- Can’t override post type using custom Elementor query
- Passing a variable containing a comma separated list of values in a meta-query
- WP_query() Simulate Missing “NOT” relation to Reverse Results?
- WP_Query to find any published post with ID greater than given ID