Does this work?
global $post; // make sure the post object is available
$slug = $post->post_name; // get the slug
// insert the slug into your query
$args = array(
'post_type' => 'client_prop',
'posts_per_page' => 10,
'tax_query' => array(
array(
'taxonomy' => 'prop_neighborhood',
'field' => 'slug',
'terms' => $slug,
)
)
);
Related Posts:
- tax_query returning all posts instead of selective posts in WP_Query
- Custom post taxonomies as tax_query terms?
- Display related CPT with custom taxonomy
- Query Custom Post Type taxonomy type based on page
- The Operator “NOT IN” Does Not Work In tax_query
- Sorting a list of posts displayed under a list of associated terms (which should be sorted without initial articles)
- How to get the parent’s taxonomy?
- Adding a term name from a custom taxonomy assigned to a post link displayed by a wp_query loop based on another taxonomy
- Combine tax_query and meta_query in WP_Query
- List all custom post type posts from a given category?
- Show Post Count of a Category
- Fetch taxonomies by custom post type id array
- Why does querying on post_tags (which has been applied to custom post types) only return posts?
- Query Multiple Taxominies Across Multiple Post type’s
- How to show CPTs in term archive
- Query custom post type by category slug
- How to Filter custom post type by taxonomy?
- Why is this query not working? (Standard posts + custom post type)
- Several post types on WP Query by tag and taxonomy
- Using meta_query and tax_query at the same time
- Custom Widget WP_Query problem
- How do I display the grand child items of a taxonomy term?
- How to display Related Posts based on number of taxonomy terms matched
- tax_query not working in template
- Variable not working in WP_Query
- WP_query – Filter by tax_query and meta_query using multiple select
- WP_Query parameter conflict
- Query all post and CPT from 2 specific taxonomies AND by ACF custom field
- Custom Category Walker with Image, Fallback to Most Recent Post in Category Image
- tax_query (if the terms are empty)
- Sort results without WP_QUERY?
- Get posts by category name
- wp_dropdown_pages with tax_query clause
- Query Custom Post Type by Taxonomy
- Query all posts under one taxonomy? Why is my code not working?
- “Menu order” being ignored when querying posts from a parent taxonomy with “include_children” set to true
- Custom Query: Multiple CPTs and a taxonomy filter
- Page that lists publications by classifying them by taxonomy
- custom post type and a “sticky” position taxonomy
- Filtering posts based on three taxonomies
- Display Custom Post Type Based on Taxonomy With WP_Query()
- How to search through all child taxonomies using WP_Query?
- WP_Query for custom taxonomies showing posts from non-specified terms?
- Custom Taxonomy – fields
- tax_query not working?
- One of my headings is mysteriously coming up as a link in my CPT Archive
- WP Query tax_query not returning posts
- Not able to get my custom search result using meta_query and tax_query together?
- Query for a custom post taxonomy
- How to show post which has the specific taxonomy terms?
- Displaying WordPress posts from post and custom post type in custom taxonomy
- Query breaking with ‘posts_per_page’ => -1
- tax_query showing no results
- How to display elements of different post types?
- category_name not working in WP_Query
- Cannot query custom post type taxonomy from theme options array
- Using tax_query to get single post per category
- WP Query Conditionally query meta and taxonomy
- How do I get parameters from the URL?
- Exclude a category from WP_Query
- WP_Query orderby custom field then post_date in one query
- How to list all categories and tags in a page?
- show tags of custom post type ONLY
- Include post id[s] into WP_Query()
- Sort the main query in subcategories/terms?
- Rewrite custom post & taxonomy to share same URL path
- Get post info inside modal window?
- Add Taxonomy Values Within a Custom Post Type RSS Feed
- Pagination Issue: Custom Post Type In Index
- Order WordPress Custom Taxonomy Pages & Pagination Not Working
- How to use WP_Query in a CPT achive page?
- Have a Custom Post Type index page display taxonomy items instead of posts
- How can i skip same post from taxonomy term?
- Pagination on a custom post type loop
- WP_Query orderby modified to include custom meta changes
- How to display custom taxonomies with links in filter menu?
- What’s the WP way to load remaining custom posts?
- Show child custom post types list inside single parent custom post type
- Filter Posts from the Main Query
- Filter get_cat_id for Custom Post Type
- WP_Query Custom Post Type if Category ID Equals
- Custom post types and ‘new WP_Query’
- Select2 AJAX and WP Query Returns ALL and does not filter
- WP_Query orderby not work with meta_key
- Having Issue on Ordering CPT by Custom Field In Custom WP Query
- Returning a custom content types with meta values
- Can I use the ‘category’ taxonomy for both posts and a custom post type?
- Search Function not searching correct custom_post_type even though post_type is defined in search args
- How to use multiple orderby conditions on query search results? (orderby one post type, relevance)
- Query a custom taxonomy in a function to create an csv file
- Custom Post By Category
- Categories manage
- Filtering custom post using Ajax and taxonomies, keep getting 0
- Get post from Category by Priority
- Custom post type blog pagination conflict
- How to display only taxonomies of custom post type in a page?
- Custom Post Type order Title ASC
- Query Custom Post Type by Tag
- Echo post count of CPT with current taxonomy
- Get a custom post type’s taxonomy type term names displayed as checkboxes and filter