Custom taxonomy: on the taxonomy term page show other taxonomy terms
Custom taxonomy: on the taxonomy term page show other taxonomy terms
Custom taxonomy: on the taxonomy term page show other taxonomy terms
How do I compare the value of two taxonomies in a wp_query
How to get related taxonomies based on a category with mysql query?
How to get post count of specific taxonomy that have store name & category
Exclude taxonomy term from list of current taxonomy terms
I could’t make it to work. May be it is not possible. I tried a plugin to set it and I was able to achieve /%issue_name%/%post_type%/%post_id%/ but not /%issue_name%/%post_type%/%post_name%/ The plugin removes that latter one by itself. Moreover I would strongly advise against such a permalink structure as it gets very taxing on WordPress performance … Read more
Nothing stands out as ‘wrong’ – though you do have a few errors: The third tax_query conditional is missing a closing bracket The third tax_query should be querying precio not $ubicacion. Cast the ID variables as integers I’d suggest putting WordPress into debug mode to highlight any syntax errors. Try doing it for only one … Read more
In the_loop, just add this code… <?php $cats = wp_get_object_terms(get_the_id(), ‘category’); ?> Print_r $cats, it will have the list of the categories applied to this post.
When the question comes to what to use Post Type, Taxonomies, custom fields ? I find that the understanding what each one of them stands for helps make the selection easier so i use: Post types – for all major data records that need/not to be displayed or queried. Taxonomies – for grouping posts/custom records … Read more
Your approach isn’t bad, but instead of echoing all of these out, you should store them in an array, then use array_unique to remove duplicate entries before displaying. <?php $array_out = array(); while ($the_query->have_posts()) : $the_query->the_post(); ?> $terms = get_the_terms( $post->ID, ‘city’); foreach($terms as $term){ $term_link = get_term_link($term, ‘city’); $array_out[] = ‘<a href=”‘.$term_link.'”>’.$term->name.'</a>’; } endwhile; … Read more