• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar

WriteNowDesign - Wordpress and Ecommerce Website Design

WordPress, Joomla, Ecommerce Website Design

  • Home
  • Prices/Packages
  • WordPress
  • Services
  • Portfolio
  • Blog
  • About
    • Testimonials
    • Locations
    • Online Payment
  • Contact
  • Show Search
Hide Search

Call 303-907-6133 Email

Genesis Add Comments to Specific Pages

How to Add Comments Form to Specific Pages in Genesis

June 22, 2013 by Pat Fortino

I recently spent a few hours trying to figure out how to add the comments form to a few pages using a StudioPress Genesis template. It’s easy enough to add comments to all pages. But not so easy to add comments to a few specific pages.

As with most things in Genesis, it is very simple once you know the trick. There are two ways to add comments to specific pages.

Method 1

If you have only a few pages, this method is easier. If you already have a lot of pages, Method 2 is more efficient.

  1. From the WordPress admin menu, select Genesis > Theme Settings.
  2. Scroll down to the Comments and Trackbacks section and click Enable comments on pages.Genesis Enable Comments on Pages
    Now, comments are turned on for all pages.
  3. Open each page on which you don’t want comments, and under the Discussion section, uncheck Allow Comments.
    Pages: Page 1 Page 2

Tagged With: genesis, Comments are closed. If you have information to share, contact me here.

Previous Post: « 10 Empty Words and Phrases to Avoid in Your Blog
Next Post: Genesis 2.0 Change Featured Image Alignment »

Reader Interactions

Comments

  1. Mark says

    August 31, 2013 at 10:06 am

    Thanks for the insight on using the ‘genesis_after_entry’ hook, I was trying to use the ‘genesis_comments’ hook but that’s obviously executed to late.

    However you are using the wp_enqueue_scripts hook to remove the action, that hook should only be used to load scripts and stylesheets; you should use the ‘wp’ hook for these kind of functions, so your code would be:

    // Remove page comments except for specific pages
    add_action( ‘wp’, ‘wnd_remove_comments’ );

    function wnd_remove_comments() {
    if ( is_page() && (!is_page(58))) {
    remove_action( ‘genesis_after_entry’, ‘genesis_get_comments_template’ );
    }
    }

    • Pat Fortino says

      August 31, 2013 at 11:17 am

      Hi Mark,

      Thanks for the comment. You are correct the wp hook works. Also, I figured out that genesis_before works too.

  2. and says

    September 11, 2013 at 11:30 am

    You can also use a page template and a genesis_get_option filter, like this:


    <?php
    /*
    Template Name: Page With Comments
    */

    add_filter( 'genesis_pre_get_option_trackbacks_pages', 'custom_page_with_comments' );
    add_filter( 'genesis_pre_get_option_comments_pages', 'custom_page_with_comments' );

    function custom_page_with_comments() {
    return true;
    }

    genesis();

    • Pat Fortino says

      September 11, 2013 at 12:20 pm

      Thanks. I’ll give that a try. Looks like a more simple solution.

Related

Primary Sidebar

Blog Categories

Call Today

Get a Free Quote

303-907-6133

Subscribe to News

News about WordPress, WooCommerce, & Technology

What’s New

  • WPForms Not Sending Notifications
  • Add Terms and Conditions WooCommerce
  • Fix WordPress AMP Validation Errors
  • Use the Classic Editor with Gutenberg Block Editor
  • Add a Message at Top or Bottom of WooCommerce Checkout Page
  • How to Link to a PDF in WordPress

Find Us On…

  • Facebook
  • LinkedIn
  • RSS

Call 303-907-6133 Email

© 2004–2023 · WriteNowDesign · Sitemap · Log in · Return to Top