Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8907341
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T02:53:27+00:00 2026-06-15T02:53:27+00:00

I know how to enable/disable comments on all pages. But how can I enable

  • 0

I know how to enable/disable comments on all pages. But how can I enable only a few, WITHOUT USING THE UI. In functions.php I just wanna go

if($this_is_a_page_i_want_comments_on) { enable_comments(); }

enable_comments(); doesn’t exist, this is the part I need help with.

I could do this using WordPress Admin by allowing comments on all pages, then going to each page and disabling comments where I don’t want them. This would take too long though.

P.S. I’m using Genesis framework.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-15T02:53:28+00:00Added an answer on June 15, 2026 at 2:53 am

    Simply hook to the comments_open filter 🙂 If you look-up in the source how the comments_open() function works, you’ll notice that the function gets the post in question and then runs it’s reposnse through the comments_open filter. Here’s an example function to override that:

    function my_override_comments_open( $open ) {
        if ( $this_is_a_page_i_want_comments_on ) {
            $open = true;
        }
        return $open;
    }
    add_filter('comments_open', 'my_override_comments_open', 1000);
    

    I assume that you know how you’ll identify the pages that you want to enable comments on – so that’s up to you.

    PP: I don’t know if it will work in Genesis or not(I presume that it should though).

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I know you can enable and disable payment methods using conditional actions, but I
I know that rsync can enable / disable the ssh encryption protocol during the
Does anyone know how to enable or disable programmatically the Quick Edit Mode in
I want to know what is the way to enable and disable internet connection
I know that g.setXORMode(Color c) enables XOR mode drawing. But how to disable this
Anyone know if its possible to enable horizontal scrolling ONLY in a windows forms
Does anybody know how I can enable line numbers for Ruby (and Ruby on
I would like to know the code which can enable me to get a
i want to disable right click on the webpage but i want enable right
Is it possible to enable/disable 'Application does not run in background'? I know I

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.