If you don’t need a “tag”, I have seen “Featured” items be featured by some a post meta key. I always need a way to feature items, so yesterday I wrote a plugin that will add a metabox to any post type you’d like, with a simple checkbox. Also has columns and quickedit capabilities.
https://github.com/helgatheviking/Featured-Item-Metabox
Then I think you ought to be able to combine a Tax Query with a Meta Query. Pulling the taxonomy and term names of your current archive from the query like so:
$args = array(
'posts_per_page' => 5,
'tax_query' => array(
array(
'taxonomy' => get_query_var('taxonomy'),
'field' => 'slug',
'terms' => get_query_var('term')
)
),
'meta_query' => array(
array(
'key' => '_featured',
'value' => 'yes'
)
)
);
$the_query = new WP_Query( $args );
Related Posts:
- Display all posts in a custom post type, grouped by a custom taxonomy
- query multiple taxonomies
- Custom Taxonomy with Custom Post Type Finds No Posts
- Counting Posts of a Given Post Type Having a Specific Taxonomy?
- Custom query – alternate posts by category
- WP_Query -> sort results by relevance (= most tags / taxonomy terms in common)
- how to group custom post type posts by custom taxonomy terms
- Displaying Posts Related to Other Posts by a Taxonomy Term?
- Querying Posts by Taxonomy From Alternate Network Site
- Custom Taxonomy List links being re-written
- Should unaltered default loop/query return a list of custom posts belonging to a custom taxonomy?
- Want to filter only parent post in admin area
- Multiple Archive Pages for Custom Post Types AND Taxonomies
- Query for posts in 2 taxonomies
- Exclude current post when getting related post on custom post type and taxonomy
- Display Posts of a Category in Alphabetical Order (Custom Post Type)
- Ordering Custom Post Types with WP_Query
- Paginated Taxonomy Term Archive including one post per term
- Custom post query by taxonomy
- Querying CPT with Two Taxonomies
- Separate Posts and Custom Post Type in Custom Taxonomy archive template
- Custom Query to display posts with custom field
- Get taxonomy description based on variable
- Is it possible to create a shortcode that will query a post based on taxonomies?
- wp_query to find posts by year and month
- Querying Term Posts in Loop
- Custom Post Type Loop within Shortcode
- Group custom posts by custom taxonomy names
- Filter by custom taxonomy slug on a custom post type
- Taxonomy Archive: Display only one post per term from separate custom taxonomy
- Pagination : How to remove /page/x/ after a ‘POST’ action on a form returning to page 1
- Display CPT posts based on specific taxonomy
- Filtering WP_Query Dynamically on the Front-End
- Why get_posts() not returning only selected category posts from Custom Post Type?
- Archive for custom taxonomy lists all posts instead of current taxonomy
- wp_query check if integer exists in custom field’s array
- Wrong request query on cpt and tax
- Search / Filter posts on Title/Content OR Tags
- WP_Query most viewed posts, in multiple Post Types, last 30 days, excluding a specific taxonomy term
- Custom-Posttype & Custom Taxonomy WP_Query
- Custom WP Query on custom meta and sort by multiple meta keys value
- WordPress loop: Show only a Custom Post Type Taxononmy TERM
- Custom taxonomies relationship
- Query Custom Post Type Taxonomy term with multiple parameters
- Add Custom Post Type of specific Custom Taxonomy to regularly blog loop
- WP_Query orderby and tax_query
- Retrieve custom post types by custom taxonomies with WP_Query
- WordPress wp_query() basic question about args
- Using page slug in wp_query
- Custom taxonomy wp_query woes.
- Creating two loops based on different logic
- Custom post type, custom taxonomy, query posts only from taxonomy (children of)
- how to get this tax_query working?
- Different options per post type in WP_Query
- How to show all taxonomies within custom post type loop
- How to get the post terms from a child taxonomy
- Custom Category Walker with Image, Fallback to Most Recent Post in Category Image
- display posts of custom post type with custom taxonomy
- Custom post type and custom taxonomy 404 on page 2
- Exclude latest post from WP_Query taxonomy term loop
- How to query Posts from a custom post type which contains a custom taxonomy?
- Foreach loop returning more than one item when querying taxonomy
- WP_Query order custom post type with certain meta key value by post modified date
- Cant’ Display Custom Post Type Title Base on Tax Terms
- Loop for custom-post-type comparing taxonomy terms for “related” posts?
- What is the most efficient way to execute recursive complex queries?
- Sorting the Loop by Taxonomy Value
- custom taxonomy pagination 404 error
- Ordering by meta value not working
- have to do a while have post to show for two custom post types sharing the same taxonomy?
- display post count in archive page that have relation with another taxonomy term
- How to search through all child taxonomies using WP_Query?
- WP_Query to display number of custom post type filtered (order by) taxonomy
- WP_Query for custom taxonomies showing posts from non-specified terms?
- Live search by custom tag
- Query a custom taxonomy in a function to create an csv file
- Ajax load more inside custom post type taxonomy
- Create a custom wp_query from a specific custom post type with specific taxonomy
- Why get_posts() returns empty array while I am trying to get posts from some specific taxonomies and work properly with others?
- Displaying WordPress posts from post and custom post type in custom taxonomy
- Display all Custom taxonomy terms and their relevant custom posts
- Get posts of an specific term of a custom taxonomy
- Checking Taxonomy Terms for a Custom Post Type With get_the_terms Not Working
- CPT Efficient way to display posts from different categories with custom query
- Query Pulling the same post twice
- WP_Query for CPT with filter by another WP_Query
- Get posts associated with custom taxonomy alternate way
- Loop with Custom Post Type and Taxonomies
- How to query posts by meta keys AND under specific category?
- Shortcode display CPT Query only showing 1 post?
- tax_query showing no results
- Values inside a custom field to determine which category posts to display
- How to display elements of different post types?
- Storing/querying custom date data
- Listing all custom post types using a specific term on the said term’s template page, in groups
- Catergory args causing loop not to show
- Attaching multiple custom taxonomies to one CPT?
- Get X posts with the same terms as the current post (custom post type and custom taxonomy)
- WP Query Conditionally query meta and taxonomy
- WP Query – Can’t get posts with specific taxonomy