Getting taxonomies associated with a specified post type

Yes, you can pass a post type to getEntityRecords() and also getTaxonomies(), both using the same format which is an object of arguments: Using getEntityRecords(): wp.data.select( ‘core’ ).getEntityRecords( ‘root’, ‘taxonomy’, { type: ‘post’ } ) Using getTaxonomies(): ( which is actually a shorthand for the above code ) wp.data.select( ‘core’ ).getTaxonomies( { type: ‘post’ } … Read more

Duplicate slug/permalink issue

You can do that using Custom Permalinks Plugin, you need to add a full slug manually [shows/2017/any]. It also allow you customize your permalink: [anyname/another/2017/example/slug]. You should still using this plugin, if you deactivate it, all permalinks will return to default [shows/2017/%postname%]

one post per term taxonomy

Yeah sure. <?php $included_post_ids =array(); $args = array( ‘post_type’ => ‘APP_POST_TYPE’, ‘post_status’ => ‘publish’, ‘posts_per_page’ => 1, ‘tax_query’ => array( array( ‘taxonomy’ => ‘coupon_category’, // Taxonomy ‘field’ => ‘slug’, ‘terms’ => $tax[0]->slug, // Your category slug ), ), ); $custom_posts = get_posts( $args ); if( !empty( $custom_posts ) ){ foreach ($custom_posts as $key => $postObj) … Read more