How to display certain category in the loop from WordPress default post type?

Of course it displays all posts… You create your own custom WP_Query, but then you ignore it and use global one 😉

Here’s the correct code:

<?php
    $args = array(
    'post_type'      => 'post',
    'category_name'  => 'wedding-venue',
    'posts_per_page' => 8,
    'facetwp' => true,
);
    $query = new WP_Query( $args );
?>

<?php if ( $query->have_posts() ) : while ( $query-> have_posts() ) : $query-> the_post(); ?>


//loop content here

<?php
    endwhile;
    wp_reset_postdata(); // this should be inside if - there is no need to rested postdata if the_post hasn’t been called.
    endif; 
?>

PS. Remember, that if you want to modify posts that are displayed in main loop, you should use pre_get_posts action – creating your own query is redundant…

tech