Display page of custom post type taxonomy in Wordpress (ok)

https://stackoverflow.com/questions/19719469/display-page-of-custom-post-type-taxonomy-in-wordpress

0

Alright, so what I have is a Wordpress theme with a custom post type (listing) and custom taxonomies under that already built in. I've successfully added my own custom taxonomy (new-developments) under the existing custom post type.

I have also setup a custom template for the new taxonomy titled taxonomy-new-developments.php which functions as well, however, when attempting to get just those custom post types with the taxonomy "new-developments" displayed on their own pages I get all the posts with the custom post type "listing".

Here is my code:

customposttypes.php -

add_action('init', 'property_new_dev_taxonomies');
function property_new_dev_taxonomies() {
register_taxonomy('new-developments',
        'listing',
        array (
        'labels' => array (
                'name' => 'New Developments',
                'singluar_name' => 'New Developments',
                'search_items' => 'Search New Developments',
                'popular_items' => 'Popular New Developments',
                'all_items' => 'All New Developments',
                'parent_item' => 'Parent New Development',
                'parent_item_colon' => 'Parent New Development:',
                'edit_item' => 'Edit New Development',
                'update_item' => 'Update New Development',
                'add_new_item' => 'Add New Development',
                'new_item_name' => 'New Developments',
        ),
                'hierarchical' => true,
                'show_ui' => true,
                'show_tagcloud' => true,
                'rewrite' => array( 'slug' => 'new-developments'),
                'query_var' => 'new-developments',
                'public'=>true)
        );
}

the call in my taxonomy-new-developments.php

Any assistance in this matter would be greatly appreciated!

EDIT: something I left out, which is key to this issue is that the desired result is a page that displays the "new-developments" in a list (this works as you can see herearrow-up-right )

Moving down the cascade of locations is where I have the problem, clicking on "Doral" which has one listing active brings up the problem page where all posts under the "listing" custom post type are displayed. This is what I need to figure out how to filter out to only display those under the "taxonomy" "location".phparrow-up-rightwordpressarrow-up-rightcustom-post-typearrow-up-righttaxonomyarrow-up-rightSharearrow-up-rightFollowedited Nov 1 '13 at 15:56arrow-up-rightasked Nov 1 '13 at 1:32arrow-up-rightRed Zephyr Designarrow-up-right10144 silver badges1313 bronze badges

  • What are the terms that you want in this "new development" taxonomy? – Chris Herbertarrow-up-right Nov 1 '13 at 3:02arrow-up-right

  • @ChrisHerbert what I need to have is the "new developments" taxonomy display any of the current or future added children, currently they are "doral" and "brickell". So the filter that I have just showing the all of the "new developments" is working properly, it's when I get down to the next level to the city filters that it's not working and just including everything from the "listing" custom post type. Sorry, this rather changes things, I am learning more about the problem as I'm moving along. Thanks in advance for any help. – Red Zephyr Designarrow-up-right Nov 1 '13 at 15:46arrow-up-right

  • Reviewing this over the weekend and I've come to the realization that I'm not quite sure what the relation is between the taxonomy of "new-developments" > "doral". Would it simply be a sub-category of the parent category? Whatever the terminology, this is the "item" that I am in need of isolating on the results page so as to get only the listings for Doral under the New Developments category. Again, any help is greatly appreciated. Thanks. – Red Zephyr Designarrow-up-right Nov 4 '13 at 15:13arrow-up-right

Add a commentarrow-up-right

1 Answer

Activearrow-up-rightOldestarrow-up-rightVotesarrow-up-right2

try with this code:

Or go through this link:

Custom Taxonomy Filtering with Wordpressarrow-up-right

ThanksSharearrow-up-rightFollowedited May 23 '17 at 10:25arrow-up-rightarrow-up-rightCommunityarrow-up-right♦111 silver badgeanswered Nov 1 '13 at 5:54arrow-up-rightKrunal Shaharrow-up-right2,00399 silver badges2727 bronze badges

Add a commentarrow-up-right

Last updated