How can I get the content of the current page in my loop while merging post-type

Question

I made a loop which is loading post-type.
But while it is loading basic post and post-type, it is not loading the main content of the page.
I am searching for a way to load the current page content while loading my post-type.

How can I do that ?

global $wp_query;
        $args = array_merge( $wp_query->query, array( 'post_type' => array('post','Projets'), 'posts_per_page' => 3, ) );
        if ( query_posts($args) ) :

        while ( have_posts() ) : the_post();
        get_template_part( 'template-parts/content', 'content' )

        endwhile;
        else :
            get_template_part( 'template-parts/none', 'none' );
        endif;
0
, Yagayente 3 years 2020-04-07T12:51:52-05:00 0 Answers 88 views 0

Leave an answer

Browse
Browse