Hello I am trying to create a page template with comments, and not having any success.
I want to use the “no container, header, footer” template - with comments added.
I tried duplicating the 2 files - one for in the child theme folder, and one for in the childtheme>framework>views>integrity folder - and then added the comments code to the second one.
First file:
<?php
// =============================================================================
// TEMPLATE NAME: CUSTOM Blank - No Container | Header, Commnets - Footer
// -----------------------------------------------------------------------------
// A custom blank page with comments
//
//
// =============================================================================
?>
<?php x_get_view( x_get_stack(), 'template', 'blank-4-custom' ); ?>
Second file:
<?php
// =============================================================================
// VIEWS/INTEGRITY/TEMPLATE-BLANK-4-CUSTOM.PHP (No Container | Header, Comments, Footer)
// -----------------------------------------------------------------------------
// A custom blank page with comments.
// =============================================================================
?>
<?php get_header(); ?>
<div class="x-main full" role="main">
<?php while ( have_posts() ) : the_post(); ?>
<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
<?php x_get_view( 'global', '_content', 'the-content' ); ?>
</article>
<?php x_get_view( 'global', '_comments-template' ); ?>
<?php endwhile; ?>
</div>
<?php get_footer(); ?>
But i must be getting something wrong.
I also tried adding this code to the child theme functions.php: (from this pages suggestion)
add_action( 'x_after_the_content_end', 'add_comment_template_pages' );
function add_comment_template_pages(){
if( is_page_template( 'template-blank-1.php' ) || is_page_template( 'template-blank-2.php' ) || is_page_template( 'template-blank-3.php' ) || is_page_template( 'template-blank-4.php' ) || is_page_template( 'template-blank-5.php' ) || is_page_template( 'template-blank-6.php' ) ||is_page_template( 'template-blank-7.php' ) || is_page_template( 'template-blank-8.php' ) ){
x_get_view( 'global', '_comments-template' );
}
}
and still no luck!
I have the comments box checked on the pages I am wanting them to appear on as well.
Can you help me with figuring this out?
Im using Pro, with Integrity stack