• When I am under a certain custom-post-type, I can easily output the specific custom-taxonomies NAME to that specific custom-post-type but not the correct link with this code:

    <?php $terms = get_the_terms( $post->ID , 'genre' );
    foreach ( $terms as $term ) {
    	echo '<a style="margin-left:5px" href="';
    	echo get_term_link( $term );
    	echo '">';
    	echo $term->name;
    	echo '</a>'; } ?>

    But I do not now how to output the custom-taxonomy link correctly for that custom-post-type like:
    example.com/movies/genre/sport/

    All I get is, without getting the custom-post-type which is /movies/:
    example.com/genre/sport/

    https://www.ads-software.com/plugins/types/

Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘How to get custom-post-type in url with custom-taxonomy?’ is closed to new replies.