Listing all custom post types using a specific term on the said term’s template page, in groups

Your code, when working, will consume sooo much resources. When implemented in this way – throught custom page template, WordPress will call for a content of that page (1 query) and after that it will call a query for each custom post type – another 4 queries. That’s a lot, really. I would suggest you … Read more

WP_Query: Fetch posts that are in (category1 and not in category2), OR posts that are not in cagegory1

Here we go, try a tax_query instead http://codex.wordpress.org/Class_Reference/WP_Query#Taxonomy_Parameters … ‘tax_query’ => array( ‘relation’ => ‘OR’, array( ‘taxonomy’ => ‘category’, ‘field’ => ‘slug’, ‘terms’ => array( ‘event’,’show_on_front’ ), ‘operator’ => ‘AND’, ), array( ‘taxonomy’ => ‘category’, ‘field’ => ‘slug’, ‘terms’ => array( ‘event’ ), ‘operator’ => ‘NOT IN’ ) )

direct custom post query interferes with other queries on page

You might be looking for wp_reset_query You would insert this after your return. add_filter(‘pre_get_posts’, ‘query_post_type’); function query_post_type($query) { if($query->is_category() || $query->is_tag() || $query->is_home() && $query->is_main_query()) { $post_type = get_query_var(‘post_type’); if($post_type) $post_type = $post_type; else $post_type = array(‘post’,’my_custom_post_type’); $query->set(‘post_type’,$post_type); return $query; } wp_reset_query; } I really hope this helps.

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);

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