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

WP SITES

2784

Original Genesis Tutorials & 6000+ Guaranteed Code

Snippets

  • Consultation
  • Full Access
  • Log in

Open Comments On All or Any WordPress Post Type Globally

Add this code at the end of your functions file or template to open comments.

Works in any theme.

Click here to access free tutorials

If you enable comments on pages & posts, you may need to manually enable them on the Edit Post/Page screen. Using this code, the comment form on all posts or pages are enabled.

The download folder contains 3 code snippets all of which you can use to enable or disable comments on posts and/or pages including custom post types.

Global Use

To enable the comment form on all pages, you would need to add the code to your functions file.

If you add the code to an archive type template like category, tag, archive or search, it won’t enable the comment form on all pages. It will enable other functions like the [post_comments] shortcode to run which will enable the comments link for specific archives but not the comment form.

This enables you to run functions which use conditional if statements with genesis_get_option( 'comments_posts' ) and/or comments_open().

Close Comments

You can also use any of the code snippets to close comments globally. Simply change true too false in any of 3 code snippets.

Comments

Reader Interactions

Leave a Reply Cancel reply

You must be logged in to post a comment.

Primary Sidebar

Code written by Brad Dalton specialist for Genesis, WooCommerce & WordPress theme customization. Read More…

Advertise · WPEngine · Genesis · Log in

  • Access Problems
  • Account Details
  • Consulting
  • Tags