Can I use multi (sub) levels of relation (AND | OR) on custom query?
Can I use multi (sub) levels of relation (AND | OR) on custom query?
Can I use multi (sub) levels of relation (AND | OR) on custom query?
The best way is to use Advanced Custom Field plugin. It takes away all the hassle to create the fields, and update them. Procedure could be: 1. Install “Advanced Custom Fields” plugin 2. Create a new field-group 3. Add desired type of field(s) 4. Add this field group to category Now, you can see your … Read more
The category objects returned by get_categories() include a property of count: $lc->count
Use get_post_meta() $url = get_post_meta($post->ID,’_url’,true) <li><a href=”https://wordpress.stackexchange.com/questions/156103/<?php echo $url ?>” target=”_blank” title=”Click here to read more”><?php echo $useful_link_post->post_title; ?></a></li>
I think you need to include the discipline variable in the custom permalink structure /%discipline%/%postname%
Attaching meta box to specific category/taxonomy in custom post type
In this specific case, it seems the multiple taxonomies have a clear hierarchical relationship. Rather than a unique taxonomy for building 1, building 2, etc., these can all be located in a single “Buildings” taxonomy that is hierarchical like this: Buildings Taxonomy: Building 1 Floor 1 Floor 2 Floor 3 Building 2 Floor 1 etc. … Read more
Get Posts by tag from a custom taxonomy
Figured it out for anyone who wants to know: function update_school( $post_id ) { $post_author_id = get_post_field( ‘post_author’, $post_id ); // get the post author ID $school_name = get_the_author_meta( ‘school2’, $post_author_id ); // from the post author ID, get the author meta $term = term_exists( $school_name, ‘school’); wp_set_post_terms( $post_id, $term, ‘school’ ); } // run … Read more
Not sure why you would try this with taxonomy. I would suggest making a meta_key “country” with the values. Then you can query it like in the documentation: $user_query = new WP_User_Query( array( ‘meta_key’ => ‘country’, ‘meta_value’ => ‘Israel’ ) ); Not sure why your taxonomy-query doesnt work, looks fine also, i use it like … Read more