Featured Images for Tags?
I use this plugin for exactly the same purpose (and for other taxonomies we got that need a featured image): http://wordpress.org/plugins/gecka-terms-thumbnails/
I use this plugin for exactly the same purpose (and for other taxonomies we got that need a featured image): http://wordpress.org/plugins/gecka-terms-thumbnails/
You’re not querying for a specific taxonomy term, you set $args[‘animal-species’], but then you overwrite the $args var later, before the query. also, that form of taxonomy query is deprecated, see tax_query in Codex.
I found my own answer in the Codex. In my use case scenario: $blog_terms = wp_get_object_terms( $post->ID, ‘blog’ ); if ( ! empty( $blog_terms ) ) { if ( ! is_wp_error( $blog_terms ) ) { foreach( $blog_terms as $term ) { echo ‘<p>’ . __( ‘Associated Blog: ‘, ‘wys’ ) . ‘<a href=”‘ . get_term_link( … Read more
You’ve converted $taxonomy_id_list to a comma separated string then shoved that string into an array. Your array now looks like array( “1,2,3,4” ); That is not going to match any author ID. You are misunderstanding what implode does. This–1,2,3,4,5,6,7— is a set of integers. If place in the array like this– array(1,2,3,4,5,6,7)— you get an … Read more
Upon initialization of the class, you need to pass two parameters: public function __construct( $tax_slug, $post_types = array() ) { So what you need to do is initialize like this: $custom_tax_mb = new WDS_Taxonomy_Radio( ‘custom-tax-slug’, array( ‘post_type’ ) ); In the second array you need to put the name of the post types for which … Read more
Change your code with the following: $args = array( ‘post_type’ => ‘property’, ‘posts_per_page’ => 5000, ); $statuses = explode( ‘,’, $st_term_final_string); $terms = explode( ‘,’, $il_term_final_string ); if ( $statuses || $terms ) { $args[‘tax_query’] = array(); if ( $statuses ) { $args[‘tax_query’][] = array( ‘taxonomy’ => ‘Status’, ‘field’ => ‘slug’, ‘terms’ => $statuses ); … Read more
Are you getting the color and price variables from the URL? If so, you need to use $_GET not $_POST, and you may want to escape or validate your value. Also I suggest not defining them as variables, because if there is no value for either of those taxonomies, you don’t need the tax queries … Read more
Your registration is a bit wrong. You did not provide any of the strings necessary to label you taxonomy correctly. Pass an array to `labels’ like this: register_taxonomy( ‘location’, array( ‘post’ ), array( ‘hierarchical’ => true, ‘labels’ => array( ‘name’ => _x( ‘Genres’, ‘taxonomy general name’ ), ‘singular_name’ => _x( ‘Genre’, ‘taxonomy singular name’ ), … Read more
If all you’re trying to do is to display all post types on the taxonomy archive, then you can easily accomplish that by filtering the query at pre_get_posts. Assuming a taxonomy foobar: function wpse111033_filter_pre_get_posts( $query ) { if ( $query->is_main_query() && $query->is_tax( ‘foobar’ ) ) { $query->set( ‘post_type’, ‘any’ ); } } add_action( ‘pre_get_posts’, ‘wpse111033_filter_pre_get_posts’ … Read more
You are passing strings as the second parameter $terms and you have a hierarchical taxonomy. Per the Codex: For hierarchical terms (such as categories), you must always pass the id rather than the term name to avoid confusion where there may be another child with the same name. If you follow the source, you will … Read more