Since you’re dealing with custom taxonomies, you must mention that custom taxonomy in has_term()
.
if ( $prr_query->have_posts() ) {
while ( $prr_query->have_posts() ) {
$prr_query->the_post();
if (has_term('proteger', 'prr')) {
the_title();
}
}
}
Related Posts:
- Show posts without term
- WordPress query with items from more than one selfdefined taxonomy as `term` argument
- display ACF repater field in archive page
- Display posts the match taxonomy term linked from wp_list_categoies?
- List taxonomy terms plus their latest post ordered by post date
- Get array of current post term ID’s
- Function get_queried_object() return NULL in custom taxonomy
- Querying on multiple taxonomies pulled from $_GET checkbox array not working?
- List custom taxonomy terms sharing posts with a term from a second custom taxonomy
- How to Filter Posts by Custom Fields?
- How to order posts by title after they have already been sorted by category
- Search form not working with custom query?
- Post loop for all taxonomy terms
- Custom taxonomy.php not working
- Filter Custom Taxonomy Posts
- How to add custom meta to ‘pre_get_terms’?
- get term id from term name
- WP_Query to output chosen term and posts with no term assigned
- WP Job Manager plugin – Listing only the twelve job categories on frontpage order by jobs they have
- How to print term name inside wp post loop
- Query Taxonomy By Page Title
- Query for specific taxonomy that executes a particular loop depending on volume of posts?
- How can I do a orderby by the number of items? So basically list by starting with the array with the largest number of post
- How do I stop the same post showing multiple times in a archive?
- Get categories within specific term
- How to define a custom hierarchy for terms?
- Custom loop – Isolating post meta output depending on current query taxonomy terms
- tax_query not working properly with get_posts
- taxonomy-{term}.php terms pagination returning 404 after a certain page
- Can I force WP_Query to return no results?
- Multiple WP_Query loops with Pagination
- WP_Query and next_posts_link
- Too slow when using both ‘tax_query’ and ‘meta_query’ both in WP_Query
- Get array of posts from the current archive page loop
- How can I save an array from a random post sequence for later use?
- How to place a loop within another loop?
- In loop: posts have thumbnail AND other variables
- How to order category.php loop by ‘meta_value’?
- Add inline HTML to posts published within last 24hrs
- Move posts to top of WP_Query if in certain Taxonomy?
- Display different number of posts from one category on the different pages
- Pagination not working Search posts
- Order terms inside a select dropdown
- Can certain (site-crashing) limitations on WP_Query in shortcode be overcome?
- Change default ordering of taxonomy terms – pre_get_terms
- Implementing an OR statement to wordpress wp_query
- Get List of all the Authors
- WP_Query, tax_query and term_meta: How to?
- WP_Query loop within WP_Query loop
- Operations with custom fields values in a loop
- Refine search results using WP_Query
- How to pass many ids in post__in?
- How to show subcategories using loop?
- Sub-loop / nested loops Best Practices
- Order posts by taxonomy count
- Show Sticky Post at the top but do not show again in the loop?
- Any number in meta key (wp query)
- How to get all unique categories for posts in loop?
- How do I run through a WordPress loop called from a filter function?
- How do I get the title of a category in a custom loop?
- Out Of memory issue on post per page parameter
- Display Custom Taxonomy Alphabetically
- Check if loop has any categories?
- How to display an other custom post type in a different custom post type’s archive?
- Get all fields inlcuding “ACF” (Advanced Custom Fields) columns in wp_query
- find posts that don’t have a custom taxonomy
- Change query from cat id to slug or name?
- Using Wp_Query without the loop?
- Custom WP_Query id
- get all posts associated with a custom taxonomy
- Assign custom parameter to each post in query
- How to set an alternate posts_per_page value for default queries in different templates
- Returning One custom taxonomy term name
- Can’t fetch Custom Post Type Data through Custom Query
- Loop increase in while loop not working
- How does WP generate the default $query in WP_Query based on the URL?
- how to get category`s slug in WP_Query loop?
- Using WP_Query for categories instead of get_terms
- How to remove only the latest sticky post from the loop
- How I can repeat 2 HTML templates in a WordPress Query?
- Does putting queries within loops cause an issue on WordPress?
- Function using get_posts() with tax_query not working when called from functions.php
- Determine if ID is page or post and query the ID
- How to make the ‘request’ filter work?
- How to add a shortcode function that returns the taxonomy slug of the actual post within the loop
- Filter for each loop when WP_Query has no posts to show
- Related categories order posts by category
- how to get custom attachment url?
- WP_Query & Duplicate entries
- taxquery taxonomy get terms
- Calling a function with WP_Query only ever brings the first result
- query_posts() doesn’t seem to be called in my page
- Create multiple sections for all categories and then queries all the posts for each of those categories
- How to get several fields from wp_query?
- Issue with WP_Query (need a array of selected ID’s)
- Next / previous posts link doesn’t show up with Posts 2 Posts
- Carousel Loop only duplicating
- How to show featured post first, then separate loop for other posts
- Custom Taxonomy in custom REST API search
- Pagination only showed when no category is set in wp_query