WP_Query for attachments without duplicating post_parent and displaying tagged image

After giving it another look with some fresh eyes, I decided to add a third loop within Loop 2 and not have it working as desired: $media_args = array( ‘post_type’ => ‘attachment’, ‘posts_per_page’ => -1, ‘tax_query’ => array( array( ‘taxonomy’ => ‘products’, ‘field’ => ‘term_id’, ‘terms’ => $product_tag ) ) ); // Loop 1 – … Read more

Load 3 posts in flexslider slide [closed]

I ended up doing this – works perfectly. <?php $argsb = array(‘posts_per_page’ => -1, ‘post_status’ => ‘publish’);?> <?php $blog = new WP_Query($argsb); if ( $blog->have_posts() ): ?> <section class=”blog-slider slider”> <div class=”flexslider”> <ul class=”slides”> <?php while ( $blog->have_posts() ) : $blog->the_post(); $i++;?> <?php if( $blog->current_post % 3 == 0 ) echo “\n”.'<li class=”slide”>’.”\n”; ?> <article … Read more

Trying to Exclude Sticky Posts From date_query

When you set up your query, do it this way ( I believe you were missing the ‘date_query’ key ): $args = array( ‘date_query’ => array( array( ‘year’ => 2012, ‘month’ => 12, ‘day’ => 12, ), ), ‘ignore_sticky_posts’ => true, ‘post__not_in’ => get_option(‘sticky_posts’) … ); $query = new WP_Query( $args ); http://codex.wordpress.org/Class_Reference/WP_Query#Date_Parameters

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