Tag_id link for current country?


Warning: count(): Parameter must be an array or an object that implements Countable in /home/styllloz/public_html/qa-theme/donut-theme/qa-donut-layer.php on line 274
0 like 0 dislike
13 views
<?php/*** The template for displaying taxonomy pages for country***** @package toursgid*/get_header(); ?><?php single_term_title('Страна: '); ?>.CUISINE<?phpglobal $wp_query;$query = new WP_Query(array_merge(array('post_type' => 'countries', 'tour-type' => 'spa' ), // this parameter is added which we $wp_query->query // this array is the base query of the current page ) ); if ( $query->have_posts() ) : while ( $query->have_posts() ) : $query->the_post(); ?> 

<?php the_title(); ?>

<?php endwhile;endif; ?>tag CUISINE only for this country <!-- ПРИ этой ссылки выводит всю кухню стран как реализовать для текущей страны ? --><?php// Reset Post Datawp_reset_postdata(); ?>NATURE<?phpglobal $wp_query;$query = new WP_Query(array_merge(array('post_type' => 'countries', 'tour-type' => 'nature', ), // this parameter is added which we $wp_query->query // this array is the base query of the current page ) ); if ( $query->have_posts() ) : while ( $query->have_posts() ) : $query->the_post(); ?>

<?php the_title(); ?>

<?php endwhile;endif; ?>tag NATURE only for this country <!-- ПРИ этой ссылки выводит всю природу стран как реализовать для текущей страны ? --><?php// Reset Post Datawp_reset_postdata(); ?><?phpget_footer();</code>


How to make a link ( tag_id ) nature, or a kitchen for the current country. In this output displays all posts in all countries.
by | 13 views

2 Answers

0 like 0 dislike
First, use the filter pre_get_posts to modify the settings, and not the crutches through the global scope.

Second, to link to one term of one taxonomy to take into account other term in another taxonomy, or you need to combine them in the url (Hello, custom rewrite rules, or kraynyak add GET parameter) or to store the selected term of taxonomy "country" between the pages - for example in a cookie. On another WP absolutely can not guess that when I filter by taxonomy=XXX&term_id=7 should be applied AND taxonomy=YYY&term_id=Z
by
0 like 0 dislike
by

Related questions

0 like 0 dislike
7 answers
0 like 0 dislike
1 answer
0 like 0 dislike
2 answers
0 like 0 dislike
1 answer
110,608 questions
257,186 answers
0 comments
35,391 users