Change from all posts to specific categories post on main page?

Your syntax is wrong, change: query_posts( array( ‘post_type’ => array( ‘post’, $include_reviews, $include_screenshots, $include_videos ), ‘paged’ => $paged ) ); to: query_posts( array( ‘tax_query’ => array( array( ‘taxonomy’ => ‘category’, ‘field’ => ‘slug’, ‘terms’ => array( $include_reviews, $include_screenshots, $include_videos ) )), ‘paged’ => $paged, ‘post_type’ => ‘post’) );

Theme layout for home page [closed]

To the extent that this question is WordPress-related, here’s what you need to know: Start with a file named index.php. Give that file the following markup: <?php get_header(); get_template_part( ‘loop’ ); get_sidebar(); get_footer(); ?> The get_header() template tag will include a file named header.php. The get_template_part( ‘loop’ ) template tag will include a file named … Read more

Get all first images of posts in same category

You can do this, and it isn’t that hard though could be a lot of work for the server. The code, a bit simplified, should look something like this: $cposts = wp_list_pluck($wp_query->posts,’ID’); // var_dump($cposts); // debug $args = array( ‘post_type’ => ‘attachment’, ‘post_mime_type’ =>’image’, ‘post_status’ => ‘inherit’, ‘order’ => ‘DESC’, ‘posts__in’ => $cposts ); // … Read more