How much worse is querying custom fields compared to custom taxonomies, quantitatively

The trouble with meta queries is they require an additional join per filter. Say you have a property site, and you’re searching by location, rooms and price. That’s three joins. If you were using taxonomies, just two (terms and term_taxonomy) – no matter how many filters. The other reason taxonomies tend to beat meta queries … Read more

How do I find the first item in the post array?

You can get first item using this code <?php global $post; $the_post_ID = $post->ID; $n = get_posts(); $i=1; ?> <?php foreach ( $n as $post ) : ?> <nav id=”postNav”> <ul> <li<?php if ($i){ echo ‘ class=”current”‘; $i=0; }?>> <a href=”https://wordpress.stackexchange.com/questions/88596/<?php the_permalink(); ?>” title=”<?php printf( esc_attr__( ‘Permalink to %s’, ‘twentyten`enter code here`’ ), the_title_attribute( ‘echo=0’ … Read more

How to do query_posts on tags pages

This is the source of all your problems: <?php if(is_home() && !is_paged()) { ?> <?php query_posts(array(‘post__in’=>get_option(‘sticky_posts’))); ?> This takes the current query, and puts it to one side, and places a new query in its place. Here you’re saying that you want to show the first page of sticky posts. You said nothing about tags … Read more

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