How do I add tags/taxonomy to images + a query field on page to query ‘albums’ (images with same tag/taxonomy)
you can search google for WordPress plugins. check these may be work for you Photosmash Galleries WP Photo Album Plus
you can search google for WordPress plugins. check these may be work for you Photosmash Galleries WP Photo Album Plus
You are using get_the_term_list which generates an HTML string of taxonomy terms associated with a post and given taxonomy. Try instead to feed the terms input parameters of the WP_Query with an array like: ‘terms’ => array( 11, 22, 33 ), or ‘terms’ => array( ‘term1’, ‘term2’, ‘term3’ ), In your code example you have … Read more
The templates use the internal name of the taxonomy. These will be the same in all languages. The internal name is the first part in register_taxonomy($taxonomy, $object_type, $args). What your users see is the translated name from the labels. So, no, you don’t have to recreate the templates for each language.
I haven’f found a solution for this, but instead I found a plugin that does exactly this. http://wordpress.org/plugins/query-multiple-taxonomies/
Few remarks: I use pre_get_posts as an action hook, not as a filter. You should use ! is_admin() to prevent this from changing your backend views. You should skip the ‘relation’ => ‘OR’, since you only have a single tax_query filter Is there any reason why you have to modify the post type ? Is … Read more
It’s OK. The only problem I can see with this solution, is that you select all post data just to check if such post exists (and posts can be long). So I would consider using custom query in this case (it gives you number of posts with this term assigned) function my_count_posts_with_term($taxonomy, $term_slug, $post_type) { … Read more
I’m afraid you have to do this manually. You can put someting like this in your single-vehicles.php file: if ( … ) { // check if it’s in used category/term get_template_part(‘part-single-vehicles-used’); } else { get_template_part(‘part-single-vehicles-new’); } And then put new car template into part-single-vehicles-new.php file and used car template into part-single-vehicles-used.php.
If you need nested queries, first you should think about, which data is needed. In your example you need all terms of a tanonomy as well as all posts belonging to each taxonomy. So the first step should be to find a way to loop through all terms of a taxonomy: /* TAXONOMIES */ // … Read more
I hope I understood everything correct: display a specific custom field from a custom post-type post assigned to a specific term in a custom taxonomy for todays and yesterdays latest entry I can’t solve this task improving your SQL-statement, but you can try the following function using standard WordPress stuff: function show_latest48h_post_cf_in_term( $cpt, $tax, $term_slug, … Read more
May be not the best solution, but I managed to get what I need and it works. I could have added to output html ul and li tags too to create the list as I asked in the beginning, but this is OK for me and no more styling needed for this design. $queried_taxonomy_name = … Read more