Recent posts by taxonomy and filter by tag
Recent posts by taxonomy and filter by tag
Recent posts by taxonomy and filter by tag
The easiest way would be to install the Yoast SEO plugin then in your wp-admin go to SEO -> Titles & Meta -> Taxonomies and click ‘no index, follow’ next to the ones you don’t wish to be indexed. Edit: Sorry, slightly confused. Your taxonomy pages have two urls? is that it?
I have finally been able to come up with a solution based on some help from my more MySQL oriented question at Stack Overflow: add_filter( ‘posts_fields’, ‘posts_fields’ ); function posts_fields( $fields ) { if ( ( is_woocommerce() || is_search() ) && ! is_admin() ) { $add = ” , CASE wt.slug WHEN ‘antique’ THEN 1 … Read more
Can’t you just use this: <?php the_tags( ‘<span class=”tags”>’, ‘, ‘, ‘</span>’ ); ?> https://codex.wordpress.org/Function_Reference/the_tags get_terms gives you all the tags from your site I think.
You will find the Codex Action Reference handy – while it doesn’t list everything, it gives a good overview of action order which can help locate the correct action if the one you’re using runs too late. In your case, wp does indeed run after the query is run, but looking at that list it … Read more
Using is_tax with multiple taxonomies
I just realized that I’m running an older version of WordPress, which is probably why this isn’t working. I will update to the latest version (4.3.1) and see if that works
I believe this has more to do with the ternary operator being used inside of string concatenation. I would eliminate this issue by relying on a classic if statement, but WordPress provides a helpful function selected, giving us: $terms = get_terms( ‘department’ ); if ( ! empty( $terms ) && ! is_wp_error( $terms ) ) … Read more
Some entries has been deleted in the table wp_term_taxonomy causing this trouble. Database has been rollback before thoose changes and now it works.
This seems a little inconvenient since there are two hops from posts to terms to term meta. WP_Query cannot operate with term meta since it doesn’t directly apply to posts. Without knowing more context of your situation and term counts involved I would guess: Pre-calculate and cache the list of valid terms (those that fall … Read more