Second wp_query doesn’t appear to be working

Because you’re calling get_post_permalink etc, I think you may need to add wp_reset_postdata(); as well, per this section in the codex: http://codex.wordpress.org/Class_Reference/WP_Query#Interacting_with_WP_Query Hope this helps, best of luck!

query_posts, oderby meta_value & print “future” posts

I would suggest storing the date-times as either: Timestamp (to sort/compare by meta_value_num) ‘yyyy-mm-dd hh:mm (e.g. 2012-04-11 19:37) to sort/compare by meta_value Then the following will work (assuming you’re using timestamp): $now = current_time(‘timestamp’); $args = array( ‘post_type’ => ‘rides’, ‘posts_per_page’ => 3, ‘meta_query’ => array( array( ‘key’ => ‘date’, ‘value’ => $now, ‘compare’ => … Read more

query inside main query order issue

the_title(), the_excerpt() and the_permalink() prints the output at once but the shortcode function is supposed to just return the output. You can use get_the_title(), get_permalink() and get_the_excerpt() instead.

Help in query for list links

Try it like this: $dates = array(); // declare an array to hold dates echo ‘<ul>’; if (have_posts()) : while (have_posts()) : the_post(); $thisday = get_the_time(‘m/d/Y’); // this post’s date if (!in_array($thisday,$dates)) { // check if it’s in the array echo ‘<h5>Date ‘.$thisday.'</h5>’; // if not, print header with date $dates[] = $thisday; // and … Read more

Query Posts to fetch Posts with Unique Tag

<?php $arg = array(‘cat’ => ‘1’,’showposts’ => 10,’offset’ => 0); query_posts($arg); if (have_posts()) : while (have_posts()) : the_post(); ?> <a class=”post-link” title=”<?php the_title(); ?>” href=”https://wordpress.stackexchange.com/questions/55868/<?php the_permalink(); ?>”><?php the_title(); ?></a> <?php if (!$used_tags) $used_tags = array(); $posttags = get_the_tags(); if ($posttags) { foreach ($posttags as $tag) { if ( !in_array($tag->term_id, $used_tags) ) { array_push($used_tags, $tag->term_id); echo … Read more