Sorry if I’m being dumb but your query says that br_type must be equal to esc_attr($values['category'])
so to put it in a variable you would just:
$br_type = esc_attr($values['category']);
Or if you want to get it from $query you would look in one of the places mentioned here:
Related Posts:
- WP_Query | Help me create a search term with an ‘OR’ relation?
- Why does “get_option” pull in the older value in options.php, rather than the newer value, on submission of a form?
- WP_Query use for a filter with multiple Taxonomies and Terms
- Duplicates with WP_Query loop
- Display related products with custom output
- How do I dynamically generate args for wp_query?
- Sorting Posts | Alphabetical Order
- Looking for most performant way to execute several similar WP queries within shortcodes
- Use wp_get_recent_posts with search term
- have_posts() execution failure
- Can’t search posts using WP_QUERY inside AJAX Function
- How can I use wp_query to show all product data using just the products ID?
- Get Current User Id Inside a Loop Returns 0 For a Shortcode
- Custom page archive query by url var calling page twice on one of my custom queries?
- How to query for posts with a null or blank post_name?
- WordPress pagination not working with search page
- WP Query with custom Shortcode
- Advanced Meta Query for Large Calendar Website (12k+ posts) (175k+ wp_postmeta rows)
- How to use an associative array in post__in with WP_Query?
- WP_Query adds “(wp_posts.ID = ‘0’)” so no results are returned
- Add more button if more 8 items
- How to store post ID’s in cookie or session to display the same posts later
- Exclude posts based on meta value
- Recent Posts Not Showing Only On A Specific Category Page [closed]
- auto-populating custom nav with all items from custom post type
- Remove echo from shortcode
- WordPress theme options error
- Get posts from multiple post type
- WP_Query fails despite having 1 post
- unable to use ‘new WP_Query’ in AJAX call
- wp_query get the 2nd post
- How to add div blocks after certain set of post
- the_posts_pagination() not working in wpquery
- WP_Query: getting posts where custom field exists
- Convert a string into a decimal number for use in query
- Increment paged on WP_Query
- Hide posts if user is added to it WP_query
- Custom route and query
- Getting posts to exclude from array
- How to hide posts of a specific custom category in WordPress?
- How to insert wp_users ->user login name to wp_terms when a new user registering?
- Custom post type permalinks do not appear using the link functions
- Order BY Most Liked And Published Between Previous Week Monday And Next Week Monday
- Modify main query before it run without pre_get_post
- Sort posts in a specific way
- array_rand not working correctly?
- WP_Query() load selected post
- How to extract information from a wp_query result?
- posts_nav_link pulling in multiple post types
- displaying a fall back query if there’s nothing in the post-type category
- Modifying WP URL handing code?
- orderby meta_value_num is not working, giving default order
- How can I modify this code to make the search box include tags and meta
- Free search and custom taxonomy query not providing the same result
- How do I reset $wp_query in a function?
- WP_Query for woocommerce products with a pattern as a post_title
- wp_query with multiple arguments with AND
- How do I make these combination select filters work when only one dropdown is set? They work in WordPress 5.8.2 but don’t in 5.8.3
- Replace a single variable with add_filter
- Nested Queries of decreasing specificity
- Wrong pagination results, page counter resets when navigating
- Sending simple variable on single page to WP JSON
- How to exclude meta no index pages from wp_list_pages
- in_array not working on dev server but works on localhost
- meta_query search names when they have middle initials
- WP query posts BUT show the most recent and one per author
- Ajax filter with loadmore button
- Query by pagename not Working
- Display featured image of post type category
- Delete post meta by serialized meta value
- get_filtered_term_product_counts – Get product terms if any products
- Add code to the header of posts by particular author
- Search for single post by 2 tags
- Paged WP_Query is quitting on page 3
- Get Child of Child Pages in custom Menu
- List all ACF field values across every post on one page
- Multiple Arrays for Custom Post Query using Boostrap accordions and ACF repeater fields
- Query to show average # of months all accounts with specific role have been active
- Woocommerce Related Product by 2 taxonomy
- Query doesn’t display text data with apostrophes
- Querying posts from wordpress with 2 or more conditionals
- SQL Query Search page
- Can’t get data from audio media
- Display Year and Month from custom field + Age Calculator
- insert thumbnail image from php script
- WP_Query count of different meta key values [duplicate]
- Masonry layout within the loop
- Query seems to be duplicated
- Keeping the previous get value and add another value when submitted
- Pagination in category.php not functioning
- Fix incorrect related posts code snippet
- wp_query on search results page showing all results every time
- How do I run the following script from my articles page?
- Execute multiple PHP Snippets causes error?
- How to initialise WP_Query on the basis of a specific meta_value and continue iterating rest?
- Three different queries on same page
- How to sort custom sortable column by custom table value
- /page/2/ redirect to 404
- How to sort search result by post_title, then by post_content
- How to get posts by a certain author in inner loop using outer loop variable or post title WordPress