Save Filter for Taxonomies

There are e.g. the following dynamic sanitize_term_fields() filters: edit_term_{$field} filter for the edit context pre_term_{$field} filter for the the db context term_{$field}_rss filter for the the rss context term_{$field} filter (default) and also the taxonomy-specific ones: edit_{$taxonomy}_{$field} filter for the edit context pre_{$taxonomy}_{$field} filter for the the db context {$taxonomy}_{$field}_rss filter for the the rss … Read more

Custom taxonomies

You can use get_the_terms( int|WP_Post $post, string $taxonomy ) . See Codex detail here. $my_terms = get_the_terms( get_the_id(), ‘regionen’ ); if ( ! empty( $my_terms ) ) { if ( ! is_wp_error( $my_terms ) ) { echo ‘<ul>’; foreach( $my_terms as $term ) { if($term->parent == 0){ echo ‘<li><a href=”‘ . get_term_link( $term->slug, ‘regionen’ ) … Read more

How to call custom taxonomy categories with shortcodes

Take a look at category post shortcode to get an idea and here is the plugin with minor modifications to call your post type and taxonomy: // Taxonomy category shortcode function cat_func($atts) { extract(shortcode_atts(array( ‘class_name’ => ‘cat-post’, ‘totalposts’ => ‘-1’, ‘category’ => ”, ‘thumbnail’ => ‘false’, ‘excerpt’ => ‘true’, ‘orderby’ => ‘post_date’ ), $atts)); $output=”<div … Read more

How to extract url from get_the_term_list?

get_term_link gives you the link of a particular taxonomy term. $terms = get_object_terms( $post->ID, ‘nom-origin’ ); $urls = array(); foreach( $terms as $term ) { $url[] = get_term_link( $term->slug, ‘nom-origin’ ); //Or do whatever you want here with the url }

Taxonomy landing pages

I can see at least 3 ways to do that. Adding a rewrite rule. See http://codex.wordpress.org/Rewrite_API for details: add_rewrite_rule(‘^(country|person|interest)/?’,’index.php?tax=$matches[1]’,’top’); then use the template_redirect filter to load your template when the taxvariable is there: if (get_query_var(‘tax’)) { # load the template here } You’ll also need to add the tax query var to the list of … Read more