Viewing 1 replies (of 1 total)
  • Plugin Author Content Views

    (@pt-guy)

    Hello,
    Blog page (or Category, Archive…page) is special page which uses template file in theme.
    For Blog page, it will use file home.php or index.php.
    In normal theme, these files will contain while loop: starts with while ( have_posts() ) and ends with endwhile;.

    – If you found file home.php, please replace that while loop with <?php echo do_shortcode(“[pt_view id=VIEW_ID]”); ?>

    – If you found file index.php, you should paste this

    if ( !is_front_page() && is_home() ) :
    	echo do_shortcode("[pt_view id=VIEW_ID]");
    else :

    before while ( have_posts() ), and paste this

    endif;

    after endwhile;.

    with VIEW_ID is ID of View you filtered posts for Blog page.

    But please remember that View maybe will not display exact posts as your original Blog page (because WordPress query on that page can be modified by theme or another plugin).

    CV Pro plugin at https://www.contentviewspro.com/ will help you to make it works perfectly, here is our document for this request
    https://docs.contentviewspro.com/completely-replace-wordpress-layout-by-content-views-pro-layout/

    Best regards,

Viewing 1 replies (of 1 total)
  • The topic ‘where to paste the code?’ is closed to new replies.