Page template with comments - Pro, with Integrity stack

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

I have also just tried removing all my other attempts, and adding the following template to x-child>framework>views>integrity . - and still no comments are showing up!

file name: template-blank-4.php

<?php

// =============================================================================
// VIEWS/INTEGRITY/TEMPLATE-BLANK-4.PHP (No Container | Header, Footer)
// -----------------------------------------------------------------------------
// A blank page for creating unique layouts.
// =============================================================================

?>

<?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' ); ?>
        <?php x_get_view( 'global', '_comments-template' ); ?>
      </article>

    <?php endwhile; ?>

  </div>

<?php get_footer(); ?>

Hi @SophiePeirce,

Thanks for writing in

I could see that you are using the right code. I could not be able to identify the problem at this time. This could be because of your setup in your Child theme or In your Wordpress Page Settings.

In this case, please share us your FTP and Admin credentials so we could check your setup further.

Don’t forget to set it in a secure note.

Thanks.

a little more digging and i found my issue.

I am using ethos stack! not integrity. OMG. I had completely forgotten about this. I usually use integrity…

problem solved.

Glad you’ve sorted it out :slight_smile:

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.