Limit Tags display and ad Drop Down Menu

This can be a start… <?php $tags = wp_get_post_tags($post_id); $html=”<div class=”post_tags”>”; $i=1; foreach ( $tags as $tag ) { $tag_link = get_tag_link( $tag->term_id ); if($i>3) { if($i==4) { $html .= ‘<ul class=”post_tags_menu”>’; } $html .= “<li><a href=”https://wordpress.stackexchange.com/questions/88264/{$tag_link}” title=”{$tag->name} Tag” class=”{$tag->slug}”>”; $html .= “{$tag->name}</a><li>”; } else { $html .= “<a href=”https://wordpress.stackexchange.com/questions/88264/{$tag_link}” title=”{$tag->name} Tag” class=”{$tag->slug}”>”; $html .= … Read more

problem in query_vars parameters

As best as I can understand, you are looking to echo out the value of a query variable. The WordPress function for getting a query variable is get_query_var(). So in your videolar.php template you would add: echo get_query_var(‘tur’);

reorder a WP_Query, using a dropdown

I guess the problem is $qry = new WP_Query(array(‘category_name’=>$GLOBALS[‘city’],’order’=>$orderby)); Let’s just say $orderby is orderby=title&order=ASC Then the order argument of WP_Query will be like this: ‘order’=>’orderby=title&order=ASC’ However, order argument only accepts: ASC and DESC. You should do somethings like this: WP_Query(‘category_name=”.$GLOBALS[“city’].’&’.$orderby);

Avoiding page loop

I would highly recommend you to make one of those wp query calls the main query & all others as secondary queries. That will make your life much easier in the long run. If you absolutely want to disable the main query, wordpress doesn’t have a direct filter for that. You can however do a … Read more

Show only one category in main query, issues on tag page

If the only issue you want to correct is the output of single_tag_title, you can correct the value via a filter by grabbing the tag query var directly: function wpa90852_fix_tag_title(){ $tag = get_term_by( ‘slug’, get_query_var(‘tag’), ‘post_tag’ ); return $tag->name; } add_filter( ‘single_tag_title’, ‘wpa90852_fix_tag_title’ );

Modify query after meta value

Here’s an example using WP_Query‘s meta_query to query posts between two meta key values: $meta_query = array( array( ‘key’ => ‘event_date’, ‘value’ => array( $date_start, $date_end ), ‘compare’ => ‘BETWEEN’ ) ); $args = array( ‘posts_per_page’ => -1, ‘meta_key’ => ‘event_date’, ‘orderby’ => ‘meta_value’, ‘meta_query’ => $meta_query ); $results = new WP_Query( $args );