Override Taxonomy Template

Take a look at the Codex: taxonomy-{taxonomy}-{term}.php – If the taxonomy were sometax, and taxonomy’s term were someterm WordPress would look for taxonomy-sometax-someterm.php. In the case of Post Formats, the taxonomy is ‘post_format’ and the terms are post-format-{format}. i.e. taxonomy-post_format-post-format-link.php taxonomy-{taxonomy}.php – If the taxonomy were sometax, WordPress would look for taxonomy-sometax.php taxonomy.php You registered … Read more

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

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

How to rename custom taxonomy URL with extra words

You’d be better off adding or modifying the rewrite variable that’s being passed to your register_taxonomy() call for the custom taxonomy. You can modify the rewrites to suit your purpose. For example: $taxonomy_args = array( // All the variables and their values… ‘rewrite’ => array( ‘slug’ => ‘services/home-care’, ), // …more variables and values… ); … Read more

Custom Taxonomy with tax_query

From the WordPress codex for wp_query: Display posts tagged with bob, under ‘people’ custom taxonomy: $args = array( ‘post_type’ => ‘post’, ‘people’ => ‘bob’ ); $query = new WP_Query( $args ); Display posts tagged with bob, under ‘people’ custom taxonomy, using tax_query: $args = array( ‘post_type’ => ‘post’, ‘tax_query’ => array( array( ‘taxonomy’ => ‘people’, … Read more