remove links on the taxonomy term
-
I would like there to be no link on the taxonomy term. At the moment I can’t find a way to remove them.
The current function I have is not adding the link so I am not sure where the link is being added.function get_the_term_list_unlinked( $id = 0, $taxonomy, $before = '', $sep = '', $after = '' ) { $terms = get_the_terms( $id, $taxonomy ); if ( is_wp_error( $terms ) ) return $terms; if ( empty( $terms ) ) return false; foreach ( $terms as $term ) { $link = get_term_link( $term, $taxonomy ); if ( is_wp_error( $link ) ) return $link; $term_links[] = $term->name ; } $term_links = apply_filters( "term_links-$taxonomy", $term_links ); return $before . join( $sep, $term_links ) . $after; }
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
- The topic ‘remove links on the taxonomy term’ is closed to new replies.