Allow comments on specific pages?

Hello again. I have some cornerstone pages which serve to support my blog content. These are really longform articles. I used the regular visual editor for this. Is it possible to allow comments for those pages? I see how to do it for those pages where I used the Pro editor.

as always, thanks for your time

Hi There,

Could you please tell us which stack & template of that page is using?

Because this requires a template change, I’d advise that you setup a child theme. This allows you to make code changes that won’t be overwritten when an X update is released. After your child theme is setup, please review how we recommend making template changes in Customization Best Practices.

Then navigate to your child theme’s /framework/views/{stack}/ directory create a file named template-blank-4.php(I assume you use the `Blank - No Container | Header, Footer) and paste the code below:

<?php

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

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

Let us know how it goes!

HI there, thanks for responding. I’m using Ethos and I do have the child theme set up already.

I’ll give this a try in the morning. Thanks!

Hello again everyone. Thanks for code, Thai. Actually, I use the default template for my pages. The other templates don’t work for my article structure. I’m not sure how to name the new file accordingly. Can someone advise?

once again, you guys are awesome!

Hi There,

If you use the default page template, the comment form should appear.

Please edit your page with Cornerstone, please on the icon on the left side > enable the Allow Comments:

Hope it helps :slight_smile:

Thai, you rock! :sunglasses: Thank you so much for staying with me on this. I actually had no idea about using Cornerstone as an editor. I like it! All is good for me now.

You guys are the most amazing support team I have ever worked with. You always go “above and beyond” to help out.

all the best,
jes

Hi @Jesamine,

Happy to hear that.

Feel free to ask us again.

THanks.

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