Page with Category Returning 1

few things here: 1) Your WP_Query args doesn’t look good, the proper way of querying posts by taxonomy should be: $splash_page_args = array( ‘post_type’ => ‘page’, ‘posts_per_page’ => ‘3’, ‘tax_query’ => array( array( ‘taxonomy’ => ‘category’, ‘field’ => ‘slug’, ‘terms’ => ‘splash-homepage’, ), ), ); 2) Is there any particular reason why you’re using foreach … Read more

Get largest page id by title?

By using wp_query you can have more control: $title = “your title” $q = new WP_Query (array( ‘posts_per_page’ => 1, ‘title’ => $title, )); And then you can iterate through, but because we used posts per page 1 you’ll get only 1 item. By default wp query displays the last first by date, you can … Read more