Salient v13.0 Major Release (3/25/2021) is now available.

If you're on a version prior to 10.5 and are considering updating, it's important to read through our update guide before updating to ensure a smooth transition.

Click here to view the update guide

Okay
  Print

Comments not showing on Pages

By default there's no option for the comment field on static pages, but adding it in is simple.

If you'd like to handle it in a cleaner, update-proof fashion, you can use the "nectar_hook_after_content" hook.

Here's an example that you can add into your child theme functions.php:

add_action('nectar_hook_after_content', 'salient_child_page_comments', 10);
function salient_child_page_comments() {
    if( is_page() ) {
        comments_template();
    }
}



1) Add the code to page.php via Apperance -> Editor .

<div class="comments-section"> <?php comments_template(); ?> </div>


2) Turn on the checkbox option in the page quick edit mode :

.

Cheers