How to relate to 2 taxonomy with category

http://codex.wordpress.org/Class_Reference/WP_Query#Taxonomy_Parameters I recently dealt with a similar, although much more complex problem where I had to guess taxonomy names that had no naming convention. I built a whole bunch of abstracted functionality to automatically build my queries for me – your need is simpler though, you might as well do these as the link above … Read more

Related Taxonomy Doesnt Show any Posts

I’m not sure what the rest of your code looks like, but you are mixing up your $query variable and you are not sending your $query to the new instance of WP_Query. Also, there is no need to send an array to the “terms” parameter if you are only using one term. Try this. <?php … Read more

Select query with two and two related taxonomies

I believe you can just use the WP_Query method to query the database with a tax_query like so: $my_query_args = array( ‘post_type’ => ‘shows’, ‘tax_query’ => array( ‘relation’ => ‘AND’, array( ‘taxonomy’ => ‘location’, ‘field’ => ‘slug’, ‘terms’ => ‘california’ ), array( ‘taxonomy’ => ‘genre’, ‘field’ => ‘slug’, ‘terms’ => ‘comedy’ ) ) ); $my_query … Read more

how to list parent terms only

get_terms(‘apptypes’,’orderby=id&parent=0′); parent argument is used to get direct children of this term (only terms whose explicit parent is this value). If 0 is passed, only top-level terms are returned. Default is an empty string. See Codex.

Loop problem – Taxonomy

You’re trying to build the permalinks yourself? That looks really tricky and fragile. Also, you’re getting a little confused trying to deal with the $loop WP_Query object. When you call $loop->the_post();, what you’re doing is populating the global variable $post with the next post in the $loop query object. So everywhere that you’re iterating over … Read more

Using taxonomies to handle layout?

Taxonomies are sort of overkill in this case. Taxonomies are not required to have an archive page (they can be used for internal things only). Your nav menus, for example, are terms in a taxonomy — just a way of grouping content that belongs together. What you’re talking about is a bit outside of that … Read more

Bug using wp_insert_term with switch_to_blog

Hook into ‘pre_insert_term’, $term, $taxonomy and dump the global $blog_id; to see if you’re on the right place: function wpse_inspect_blog_id( $term, $taxonomy ) { global $blog_id; var_dump( $blog_id ); exit; } function wpse_hook_inspector_blog_id() { add_filter( ‘pre_insert_term’, ‘wpse_inspect_blog_id’ ); } add_action( ‘init’, ‘wpse_hook_inspector_blog_id’ );

How to display posts from two taxonomies?

You should move – if not hierarchical – to “post_tags”, or a custom non-hierarchical taxonomy. The rest is more a query Question: New template > Query taxonomy > Add specific tags to the query Assign template to page Add page to menu So if you link to london and want to display all doctors, including … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)