How to display the 5 latest post titles but allow only 1 in there of a specific category

You could do one query for the 4 latest posts excluding the schaft category, then do another query for the latest post in schaft. get the date of the single schaft post and check it against the dates of the other posts as you output them, inserting it in the correct position.


Two loop example:

$category = 1; // category to exclude from 1st / use for 2nd query
$first_args = array(
    'posts_per_page' => 4,
    'category__not_in' => $category
$second_args = array(
    'posts_per_page' => 1,
    'cat' => $category
$first_query = new WP_Query( $first_args );
$second_query = new WP_Query( $second_args );


while( $first_query->have_posts() ):

    // insert post from 2nd query if its post date is greater than this post date
    // but less than the previous, or the previous is empty because it's the first
    if( $second_query->post->post_date > $post->post_date
        && ( $second_query->post->post_date < $previous_date || $previous_date="" ) ):
        // output post from second query
        // reset post global
        $post = $first_query->post;

    // output post from first query

    $previous_date = $post->post_date;