display news with pictures 3 small and one large (loop)

I don’t know why have you put $b%4==1 condition. You can simply check for $b==1.And one more thing I would suggest is to use if and else both.So code would be something like this: <?php $b=1; $args = array( ‘tax_query’ => array( array( ‘taxonomy’ => ‘gens’, ‘field’ => ‘slug’, ‘terms’ => ‘newsgen’ ) ), ‘post_type’=>”, … Read more

WordPress custom post type queries

This all depends on what you’re actually saving in your post meta. If you’re actually saving the ID you could create a secondary query on your single-post_type.php page. <?php if( have_posts() ) : ?> <?php while( have_posts() ) : the_post(); $cpt2_meta = get_post_meta( $post->ID, ‘_meta_name’, true ); // Get out Post Type 2 Meta ?> … Read more

show latest authors blog post

Please Try This To Get Post in DESC order $args = array( ‘orderby’ => ‘title’, ‘order’ => ‘DESC’, ‘author’ =>’authorName’, ); $query = new WP_Query( $args ); // The Loop if ( $query ->have_posts() ) { echo ‘<ul>’; while ( $query ->have_posts() ) { $query ->the_post(); echo ‘<li>’ . get_the_title() . ‘</li>’; } echo ‘</ul>’; … Read more

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