[WP_Query][1]
provides list of options including [Taxonomy Parameters][2]
. You can use the taxonomy parameter to search the posts like:
post_type' => 'firma',
'post_status' => 'publish',
'order' => 'DESC',
'orderby' => 'date',
's' =>$_POST['term'],
'posts_per_page' =>5
'tax_query' => array(
array(
'taxonomy' => $_POST['term'],
)
);
Related Posts:
- Can I force WP_Query to return no results?
- Use the page slug in a WP_Query?
- paginate_links() adds empty href to first page and previous link
- Using OR conditions in meta_query for query_posts argument
- Get array of posts from the current archive page loop
- Get posts by menu ID
- count posts from custom taxonomy terms by year
- How to grab metabox value in wp_query meta_query key
- Woocommerce query by price range and custom meta key
- Get posts with condition on comment meta value
- Stop all SQL_CALC_FOUND_ROWS wordpress queries
- Move posts to top of WP_Query if in certain Taxonomy?
- WP_query ‘orderby=none’ Problem
- Pagination not working on static page
- How can I create a WP_Query that returns posts where one meta_value
- ‘paged’ in wp_query doesn’t work
- Sorting meta_value as integer doesn’t work
- Get posts from the Main site to sub site – WordPress MultiSites Network
- Custom Field Query – Meta Value is Array
- Get array of current post term ID’s
- WP_Query for showing specific post by id
- Ordering by meta_value AND date NOT WORKING with wp_query
- Query by custom dates in UNIX Time
- Custom WP Query from meta_value stored as serialised array
- Implementing an OR statement to wordpress wp_query
- Get List of all the Authors
- Minimize database queries to user tables?
- WP_Query returns more results than expected
- How to make Meta Query case sensitive?
- Populate tax_query terms parameter with post term
- Orderby the sum of several numeric custom meta fields
- unable to retrive parent page information
- Site not getting correct featured image from my query
- Using WP_Query within an mu-plugin
- wp_query ‘s’, search filter with pagination is not working
- Use more than one query, but prevent duplicates – at scale!
- WP Query related posts by tags
- How to add posts, manually, to a wp_query?
- wp_reset_postdata() does not work as expected
- Search Query for multiple categories using ‘OR’ but having certain categories be ‘AND’
- WP_query with OR relation between args[‘s’] and arg[‘meta_query’]
- How to display an other custom post type in a different custom post type’s archive?
- Replacing raw database query to WP_Query
- Stale $GLOBALS[‘post’] after custom WP_Query empty result set bothers my template, whose fault is this?
- WP CLI can’t delete plugin related table
- Inserting HTML to close and open divs in WP_Query loops
- How to count posts with specific arguments
- Query only the posts with a post format of “audio”
- Display Current Post’s Position in Custom Taxonomy
- Using Wp_Query without the loop?
- WP Query with multiple tags by get the tags
- Woocommerce pagination and result count after custom loop
- Include latest author posts with pagination in single template?
- How to querry for an item that saved in an array?
- Is it possible to add an argument to a custom function added to a filter hook?
- get_post() is not returning correct value
- Order by meta_key doesn’t work
- CPT category post/content is not showing on my page, Please review my coede
- how to get category`s slug in WP_Query loop?
- Child pages not affected by orderby
- Write WP Query that selects posts that are part of the same two categories
- Error in meta_query not get result
- Custom wp_query – I’m getting ‘all’ post, not the specific post in the query
- How to get current page nearest parent id?
- How to create Page templates for showing Blog posts in different layouts?
- wp Query Posts to display in Nivo Slider
- How to get only ONE category of “Portfolio” posts to display on main page rather than ALL categories?
- Prioritising and Ordering Posts By Category Name Using A Custom Loop
- Filter products on category AND tag
- Strange behaviour of hierarchical taxonomy archive
- meta_query – check for multiple meta values in key which holds an array of values
- How to sort wordpress posts already selected by WP_QUERY
- Searching for a specific month in a metadata saved as Timestamp (Wp_Query)
- Doing $wpdb->get_results returns NULL, doing the same query in my DB returns correct value
- SEARCH QUERY PLEASE HELP | call_user_func_array() expects parameter 1 to be a valid callback php
- how to get wp_query posts only first letter of alphabet A?
- Get posts having meta value between two numbers
- Merge wp-query and get_users
- WP_Query how to add a thumbnail to the first post from the last 5 posts?
- How order by works?
- Query by meta value (add a dropdown of all values)
- taxquery taxonomy get terms
- Using modified ‘meta_key’ to set ‘orderby’ in WP_Query?
- Calling a function with WP_Query only ever brings the first result
- get last child post by wp_query
- WP_Query don’t working with fixed post_id and term_taxonomy
- How To Query All Attachment Images Found In Post Galleries
- Create multiple sections for all categories and then queries all the posts for each of those categories
- Using orderby with 2 meta keys
- wp_query – Modify $query to include duplicate content
- $wp_query when new WP_Query
- Query to get all the posts of more than 2 meta_value having same meta_key?
- WP Query get posts by specific author IDs if one of several logged in authors
- Query specific number of posts for each post type in specific order
- Avoiding page loop
- Query Users by post count, last 30 days and display each users post count according to post type
- how do I exclude child categories from a wp_query?
- WP Query – Show custom posts only if user contain some user meta
- How do I subquery with custom meta fields?
- Advanced Search – Is this possible?