Comments in pages

Hi,

I had changed the page template from “default” to “black - no container - footer and header” and now i don´t see the comments.

Why?

Note: I have the comments activated in this page.

I had been testing, and when you select the “Blank - Container” or “Blank - No Container” the comments disappear.

I have to choose “Layout Fullwith”. Is there not an option with the Blanks templates?

Hi There,

The comment was disabled by default in the “Blank - Container” or “Blank - No Container”.

To enable it, please create these files in this directory: x-child/framework/views/integrity/

  • template-blank-1.php
<?php

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

?>

<?php get_header(); ?>

  <div class="x-container max width offset">
    <div class="x-main full" role="main">

      <?php while ( have_posts() ) : the_post(); ?>

        <article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
          <div class="entry-wrap">
            <?php x_get_view( 'global', '_content', 'the-content' ); ?>
            <?php x_get_view( 'global', '_comments-template' ); ?>
          </div>
        </article>

      <?php endwhile; ?>

    </div>
  </div>

<?php get_footer(); ?>
  • 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(); ?>

Thank you very much.

Glad to see we managed to help

Hi,

I have the same issue, but with “Blank - no container | No Header, Footer”
I don’t see the comments here.

I guess the code you postet just has to be adjusted a little bit, but I don’t know how.

Could you help me out with this?

Hi @onixbox,

In this case, you have to create the template-blank-8.php file:

<?php

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

?>

<?php

if ( apply_filters( 'x_legacy_cranium_headers', true ) ) {
  x_get_view( 'global', '_header' );
} else {
  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,

I had added the templates to the child theme and they work.

The thing is that the comments are in the page, and not in the background as in the posts.

If you see this post: https://frenchiemania.com/razones-para-no-comprar-bulldog-frances

and see this page: https://frenchiemania.com/bulldog-frances/adoptar

you´ll be able to see waht i am talking about

Hey Ignacio,

You will need to update the template and use this code:

<?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' ); ?>
      </article>

        <?php x_get_view( 'global', '_comments-template' ); ?>

    <?php endwhile; ?>

  </div>

<?php get_footer(); ?>

Please let us know how it goes.

HI,

The commens still appear in the white background.

Hi There,

Would you mind providing us with login credentials(by clicking on the Secure Note button at the bottom) so we can take a closer look? To do this, you can make a post with the following info:

  • Link login to your site
  • WordPress Admin username / password
  • FTP credentials

Thanks.

Of course, here you have.

Hi,

You need to put the comment section outside entry wrap

for template-blank-1.php

<?php

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

?>

<?php get_header(); ?>

  <div class="x-container max width offset">
    <div class="x-main full" role="main">

      <?php while ( have_posts() ) : the_post(); ?>

        <article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
          <div class="entry-wrap">
            <?php x_get_view( 'global', '_content', 'the-content' ); ?>
          </div>
<?php x_get_view( 'global', '_comments-template' ); ?>
        </article>

      <?php endwhile; ?>

    </div>
  </div>

<?php get_footer(); ?>

Hope that helps.

That worked. Thanks!

You’re welcome! :slight_smile:

Hi,

in this page (https://digitalessen.com/curso-como-crear-negocio-online/), I am using template-blank-6.php, I add the code, but a pagging appers on the sides. Why? I am using this code:

  <div class="x-main full" role="main">

<?php while ( have_posts() ) : the_post(); ?>

    <article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
      <div class="entry-wrap">
        <?php x_get_view( 'global', '_content', 'the-content' ); ?>
      </div>
    <?php x_get_view( 'global', '_comments-template' ); ?>
    </article>

  <?php endwhile; ?>

Hi There,

Could you please try adding the following CSS rule and see if that helps.

.page-id-1786 #comments {
    padding-left: 40px;
    padding-right: 40px;
}

Hope that helps.

The thing is that I use this template in many pages.

Is there a way to change the code in the template?

Hi There,

In that case, update the above code as follows.

.page-template-template-blank-6 #comments {
    padding-left: 40px;
    padding-right: 40px;
}

Hope that helps.

Why does that padding appears when I change the template?