Show Custom Taxonomy title in loop

The name of the current taxonomy term is in the name property of the term object, so, in your loop just echo it: if( $posts->have_posts() ): while( $posts->have_posts() ) : $posts->the_post(); ?> <div class=”cat-preview”> <a href=”https://wordpress.stackexchange.com/questions/114323/<?php esc_url( the_permalink() ); ?>”><?php the_post_thumbnail (‘medium’); ?></a> <h2><?php echo $term->name; ?></h2> </div><?php endwhile; endif;

Display all posts that use a custom taxonomy

I think your problem is here: ‘terms’ => array($clients_terms->slug) You define $clients_terms like so: $clients_terms = get_terms(‘clients’); …which will return an array of objects. But you try to access it as an object in your query args. That should be producing some kind of PHP notice? (Trying to get property of non-object, or something?) Try … Read more

What is the most efficient way of implementing a notification system? [closed]

If you’re looking to get in to instant notifications without suffering from backlog, I’d looking in to both Node.js and Socket.io. You should be able to work with them both pretty easily and integrate w/ WordPress. The sample chat application on the Socket.io site isn’t a far cry from what you’d be doing. Basically an … Read more

Why cant I add a custom post type to a custom taxonomy?

The post_category you are using is for core categories taxonomy. For custom taxonomies you have to use tax_input. For example, the next code set terms for custom_tax_category and custom_ta_tag taxonomies. $args = array( ‘post_type’ => ‘custom_post_type’, ‘post_title’ => wp_strip_all_tags( $title ), ‘post_content’ => ‘some content’, ‘post_status’ => ‘publish’, ‘post_author’ => $author_id, ‘tax_input’ => array( ‘custom_tax_category’ … Read more

Custom URLs in Custom Search Results

You can get close to what you want by using the template_redirect hook. function my_custom_search_url_rewrite() { if ( is_search() && ! empty( $_GET[‘s’] ) ) { wp_redirect( home_url( “/search/” ) . urlencode( get_query_var( ‘s’ ) ) ); exit(); } } add_action( ‘template_redirect’, ‘my_custom_search_url_rewrite’ ); Then you can use a URL like http://domain.com/search/category+location/. If you then … Read more

find posts that don’t have a custom taxonomy

Emily’s answer is mostly correct, just that the operator shouldn’t have an underscore in it: $args = array( ‘post_type’ => ‘my_post_type’, ‘tax_query’ => array( array( ‘taxonomy’ => ‘series’, ‘operator’ => ‘NOT EXISTS’, ), ), ); $query = new WP_Query( $args );