Custom Post Type with Custom Taxonomy in Bootstrap 4 Accordion

Here the solution: <?php $post_type=”paradas”; // Get all the taxonomies for this post type $taxonomies = get_object_taxonomies( (object) array( ‘post_type’ => $post_type ) ); foreach( $taxonomies as $taxonomy ) : // Gets every “category” (term) in this taxonomy to get the respective posts $terms = get_terms( $taxonomy, array( ‘orderby’ => ‘name’, ‘order’ => ‘ASC’, ‘hide_empty’ … Read more

Custom Permalink Structure with Custom Post Types Using Custom Taxonomies

A simple solution would be using the rewrite and ‘with_front arguments while registering the post type. Try this.. ‘with_front’ => false, ‘rewrite’ => array( ‘slug’ => ‘%services%/%areas%’), Then add a filter to post_type_link to replace the tags with terms. function wpse277778_rewrite_urls( $url, $post ) { if ( ‘listings’ == get_post_type( $post ) ) { $services … Read more