{"id":1339,"date":"2021-07-23T07:07:18","date_gmt":"2021-07-23T12:07:18","guid":{"rendered":"https:\/\/www.knownhost.com\/kb\/?p=1339"},"modified":"2023-03-10T12:40:20","modified_gmt":"2023-03-10T18:40:20","slug":"what-code-determines-how-wordpress-comments-behave","status":"publish","type":"post","link":"https:\/\/www.knownhost.com\/kb\/what-code-determines-how-wordpress-comments-behave\/","title":{"rendered":"What Code Determines How WordPress Comments Behave?"},"content":{"rendered":"<div id=\"ez-toc-container\" class=\"ez-toc-v2_0_82_2 ez-toc-wrap-right counter-hierarchy ez-toc-counter ez-toc-custom ez-toc-container-direction\">\n<div class=\"ez-toc-title-container\">\n<p class=\"ez-toc-title\" style=\"cursor:inherit\">Table of Contents<\/p>\n<span class=\"ez-toc-title-toggle\"><a href=\"#\" class=\"ez-toc-pull-right ez-toc-btn ez-toc-btn-xs ez-toc-btn-default ez-toc-toggle\" aria-label=\"Toggle Table of Content\"><span class=\"ez-toc-js-icon-con\"><span class=\"\"><span class=\"eztoc-hide\" style=\"display:none;\">Toggle<\/span><span class=\"ez-toc-icon-toggle-span\"><svg style=\"fill: #212121;color:#212121\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" class=\"list-377408\" width=\"20px\" height=\"20px\" viewBox=\"0 0 24 24\" fill=\"none\"><path d=\"M6 6H4v2h2V6zm14 0H8v2h12V6zM4 11h2v2H4v-2zm16 0H8v2h12v-2zM4 16h2v2H4v-2zm16 0H8v2h12v-2z\" fill=\"currentColor\"><\/path><\/svg><svg style=\"fill: #212121;color:#212121\" class=\"arrow-unsorted-368013\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"10px\" height=\"10px\" viewBox=\"0 0 24 24\" version=\"1.2\" baseProfile=\"tiny\"><path d=\"M18.2 9.3l-6.2-6.3-6.2 6.3c-.2.2-.3.4-.3.7s.1.5.3.7c.2.2.4.3.7.3h11c.3 0 .5-.1.7-.3.2-.2.3-.5.3-.7s-.1-.5-.3-.7zM5.8 14.7l6.2 6.3 6.2-6.3c.2-.2.3-.5.3-.7s-.1-.5-.3-.7c-.2-.2-.4-.3-.7-.3h-11c-.3 0-.5.1-.7.3-.2.2-.3.5-.3.7s.1.5.3.7z\"\/><\/svg><\/span><\/span><\/span><\/a><\/span><\/div>\n<nav><ul class='ez-toc-list ez-toc-list-level-1 eztoc-toggle-hide-by-default' ><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-1\" href=\"https:\/\/www.knownhost.com\/kb\/what-code-determines-how-wordpress-comments-behave\/#template_header_for_commentsphp\" >Template Header for comments.php<\/a><ul class='ez-toc-list-level-3' ><li class='ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-2\" href=\"https:\/\/www.knownhost.com\/kb\/what-code-determines-how-wordpress-comments-behave\/#section_1\" >Section 1<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-3\" href=\"https:\/\/www.knownhost.com\/kb\/what-code-determines-how-wordpress-comments-behave\/#section_2\" >Section 2<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-4\" href=\"https:\/\/www.knownhost.com\/kb\/what-code-determines-how-wordpress-comments-behave\/#section_3\" >Section 3<\/a><\/li><\/ul><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-5\" href=\"https:\/\/www.knownhost.com\/kb\/what-code-determines-how-wordpress-comments-behave\/#template_title_for_commentsphp\" >Template Title for comments.php<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-6\" href=\"https:\/\/www.knownhost.com\/kb\/what-code-determines-how-wordpress-comments-behave\/#template_wordpress_comments_list_for_commentsphp\" >Template WordPress Comments List for comments.php<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-7\" href=\"https:\/\/www.knownhost.com\/kb\/what-code-determines-how-wordpress-comments-behave\/#wordpress_comments_template_pagination_for_commentsphp\" >WordPress Comments Template Pagination for comments.php<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-8\" href=\"https:\/\/www.knownhost.com\/kb\/what-code-determines-how-wordpress-comments-behave\/#template_wordpress_comments_closed_notice_for_commentsphp\" >Template WordPress Comments Closed Notice for comments.php<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-9\" href=\"https:\/\/www.knownhost.com\/kb\/what-code-determines-how-wordpress-comments-behave\/#template_form_and_finish_for_commentsphp\" >Template Form and Finish for comments.php<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-10\" href=\"https:\/\/www.knownhost.com\/kb\/what-code-determines-how-wordpress-comments-behave\/#conclusion\" >Conclusion<\/a><\/li><\/ul><\/nav><\/div>\n\n<p>WordPress will display comments in your theme based on whether <a href=\"https:\/\/wordpress.org\/support\/article\/comments-in-wordpress\/\">comments<\/a> have been submitted, providing it\u2019s a single post or page, so long as your theme has the necessary comment template file present and providing you\u2019ve got discussion options set so that comments are enabled.<\/p>\n\n\n\n<p>The theme file that determines how comments are displayed is called:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>  comments.php<\/code><\/pre>\n\n\n\n<p>Comments.php is actually a template file that contains the database query logic for pulling comments out of the database as well as what details about the comments are to be displayed. This is then supplemented with&nbsp;CSS&nbsp;for styling and beautification.<\/p>\n\n\n\n<p>But what\u2019s all included in the comments.php template file? Read on\u2026.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"template_header_for_commentsphp\"><span class=\"ez-toc-section\" id=\"template_header_for_commentsphp\"><\/span>Template Header for comments.php<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>Any template \/ theme files should begin with a template header to explain what the file is, does, etc &#8211; all the relevant details.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"section_1\"><span class=\"ez-toc-section\" id=\"section_1\"><\/span>Section 1<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p>It will specify the theme name, version details and not a lot else. Here\u2019s an example from the WordPress Twentyseventeen Theme.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>  &lt;?php\n  \/**\n  * The template for displaying comments\n  *\n  * This is the template that displays the area of the page that contains both the current comments\n  * and the comment form.\n  *\n  * @link https:\/\/developer.wordpress.org\/themes\/basics\/template-hierarchy\/\n  *\n  * @package WordPress\n  * @subpackage Twenty_Seventeen\n  * @since Twenty Seventeen 1.0\n  * @version 1.0\n  *\/<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"section_2\"><span class=\"ez-toc-section\" id=\"section_2\"><\/span>Section 2<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p>This is where checks are made to see if it\u2019s a password protected post. If so, the routine bails and doesn\u2019t continue displaying information.<\/p>\n\n\n\n<p>Whatever the theme, the check should occur, and return if password protection is detected:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>  \/*\n  * If the current post is protected by a password and\n  * the visitor has not yet entered the password we will\n  * return early without loading the comments.\n  *\/\n  if ( post_password_required() ) {\n    return;\n  }\n  ?&gt;<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"section_3\"><span class=\"ez-toc-section\" id=\"section_3\"><\/span>Section 3<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p>Finally, check to see if there actually are any comments to be made:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>  &lt;div id=\"comments\" class=\"comments-area\"&gt;\n  &lt;?php\n  \/\/ You can start editing here -- including this comment!\n    if ( have_comments() ) :\n  ?&gt;<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"template_title_for_commentsphp\"><span class=\"ez-toc-section\" id=\"template_title_for_commentsphp\"><\/span>Template Title for comments.php<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>The comment title is simply the intro to the fact you\u2019ve got comments, the count of the comments or other visible heading above the comments, wherever they are displayed.<\/p>\n\n\n\n<p>In the case of Twenty Seventeen, the comments number and the title above the comment is displayed:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>  &lt;h2 class=\"comments-title\"&gt;\n    &lt;?php\n      $comments_number = get_comments_number();\n      if ( '1' === $comments_number ) {\n        \/* translators: %s: Post title. *\/\n        printf( _x( 'One Reply to &amp;ldquo;%s&amp;rdquo;', 'comments title',\n        'twentyseventeen' ), get_the_title() );\n      } else {\n        printf(\n          \/* translators: 1: Number of comments, 2: Post title. *\/\n          _nx(\n            '%1$s Reply to &amp;ldquo;%2$s&amp;rdquo;',\n            '%1$s Replies to &amp;ldquo;%2$s&amp;rdquo;',\n            $comments_number,\n            'comments title',\n            'twentyseventeen'\n        ),\n        number_format_i18n( $comments_number ),\n        get_the_title());\n      }\n    ?&gt;\n  &lt;\/h2&gt;<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"template_comment_list_for_commentsphp\"><span class=\"ez-toc-section\" id=\"template_wordpress_comments_list_for_commentsphp\"><\/span>Template WordPress Comments List for comments.php<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>Using the wp_list_comments function, the comment list is built as a list which includes:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Avatar &#8211; sizing of author avatar<\/li>\n\n\n\n<li>List &#8211; list style &#8211; ordered or not<\/li>\n\n\n\n<li>Short Ping &#8211; varies based on pingback or not<\/li>\n\n\n\n<li>Reply Text &#8211; label surrounding replies<\/li>\n<\/ul>\n\n\n\n<p>WordPress Comments displayed via the function, all in one neat little parcel of code:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>  &lt;ol class=\"comment-list\"&gt;\n    &lt;?php\n      wp_list_comments(\n        array(\n          'avatar_size' =&gt; 100, \n          'style' =&gt; 'ol',\n          'short_ping' =&gt; true,\n          'reply_text' =&gt; twentyseventeen_get_svg( \n              array('icon' =&gt; 'mail-reply' ) \n           ) . __( 'Reply', 'twentyseventeen' ), \n        )\n      );\n    ?&gt;\n  &lt;\/ol&gt;<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"template_pagination_for_commentsphp\"><span class=\"ez-toc-section\" id=\"wordpress_comments_template_pagination_for_commentsphp\"><\/span>WordPress Comments Template Pagination for comments.php<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>There can be cases where you\u2019ve got enough comments that they need to be paginated, thus adding navigation so that people can view them in chunks.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>  &lt;?php\n    the_comments_pagination(\n      array(\n        'prev_text' =&gt; twentyseventeen_get_svg( array( 'icon' =&gt; 'arrow-left' ) ) . \n        '&lt;span class=\"screen-reader-text\"&gt;' . __( 'Previous', 'twentyseventeen' ) . '&lt;\/span&gt;',\n        'next_text' =&gt; '&lt;span class=\"screen-reader-text\"&gt;' . __( 'Next','twentyseventeen' ) . \n        '&lt;\/span&gt;' . twentyseventeen_get_svg( array( 'icon' =&gt; 'arrow-right' ) ),\n      )\n    );\n  endif; \/\/ Check for have_comments().<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"template_comments_closed_notice_for_commentsphp\"><span class=\"ez-toc-section\" id=\"template_wordpress_comments_closed_notice_for_commentsphp\"><\/span>Template WordPress Comments Closed Notice for comments.php<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>If you\u2019ve got comments, but have closed them, for whatever reason, sometimes it would be nice to mention that fact to people, so that they don\u2019t wonder exactly what\u2019s going on.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>  \/\/ If comments are closed and there are comments, let's leave a little note, shall we?\n  if ( ! comments_open() &amp;&amp; get_comments_number() &amp;&amp; post_type_supports(\n    get_post_type(), 'comments' ) ) :\n  ?&gt;\n  &lt;p class=\"no-comments\"&gt;&lt;?php _e( 'Comments are closed.', 'twentyseventeen'); ?&gt;&lt;\/p&gt;\n  &lt;?php\n  endif;<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"template_form_and_finish_for_commentsphp\"><span class=\"ez-toc-section\" id=\"template_form_and_finish_for_commentsphp\"><\/span>Template Form and Finish for comments.php<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>The final stage is to display the comment form so that more comments can be added and then to close the routine, so that other code can continue executing elsewhere:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>  comment_form();\n  ?&gt;\n  &lt;\/div&gt; &lt;!-- #comments --&gt;<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"conclusion\"><\/span>Conclusion<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>Have a WordPress website? Check out our <a href=\"https:\/\/www.knownhost.com\/wordpress-hosting\"><strong>Managed Hosting for WordPress<\/strong><\/a> and see if we are a good fit for you. <strong><a href=\"https:\/\/www.knownhost.com\">KnownHost <\/a><\/strong>offers 365 days a year, 24 hours a day, all 7 days of the week best in class technical support. A dedicated team ready to help you should you need our assistance. You\u2019re not using KnownHost for the best webhosting experience? Well, why not?<\/p>\n","protected":false},"excerpt":{"rendered":"<p>WordPress will display comments in your theme based on whether comments have been submitted, providing it\u2019s a single post or page, so long as your theme has the necessary comment template file present and providing you\u2019ve got discussion options set so that comments are enabled. The theme file that determines how comments are displayed is [&hellip;]<\/p>\n","protected":false},"author":4,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[146],"tags":[251,252,106],"class_list":["post-1339","post","type-post","status-publish","format-standard","hentry","category-wordpress","tag-blogs","tag-cms","tag-wordpress"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.3 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>What Code Determines How WordPress Comments Behave? - KnownHost<\/title>\n<meta name=\"description\" content=\"Are you looking for a way to make changes to your WordPress comments? In this guide we will show you what part controls WordPress comments.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.knownhost.com\/kb\/what-code-determines-how-wordpress-comments-behave\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"What Code Determines How WordPress Comments Behave? - KnownHost\" \/>\n<meta property=\"og:description\" content=\"Are you looking for a way to make changes to your WordPress comments? In this guide we will show you what part controls WordPress comments.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.knownhost.com\/kb\/what-code-determines-how-wordpress-comments-behave\/\" \/>\n<meta property=\"og:site_name\" content=\"KnownHost\" \/>\n<meta property=\"article:published_time\" content=\"2021-07-23T12:07:18+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2023-03-10T18:40:20+00:00\" \/>\n<meta name=\"author\" content=\"Jonathan K. W.\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Jonathan K. W.\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"4 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.knownhost.com\\\/kb\\\/what-code-determines-how-wordpress-comments-behave\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.knownhost.com\\\/kb\\\/what-code-determines-how-wordpress-comments-behave\\\/\"},\"author\":{\"name\":\"Jonathan K. W.\",\"@id\":\"https:\\\/\\\/www.knownhost.com\\\/kb\\\/#\\\/schema\\\/person\\\/3db6e20d1f33519cd68fe0ba1230a48b\"},\"headline\":\"What Code Determines How WordPress Comments Behave?\",\"datePublished\":\"2021-07-23T12:07:18+00:00\",\"dateModified\":\"2023-03-10T18:40:20+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.knownhost.com\\\/kb\\\/what-code-determines-how-wordpress-comments-behave\\\/\"},\"wordCount\":524,\"keywords\":[\"blogs\",\"cms\",\"wordpress\"],\"articleSection\":[\"WordPress\"],\"inLanguage\":\"en-US\"},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.knownhost.com\\\/kb\\\/what-code-determines-how-wordpress-comments-behave\\\/\",\"url\":\"https:\\\/\\\/www.knownhost.com\\\/kb\\\/what-code-determines-how-wordpress-comments-behave\\\/\",\"name\":\"What Code Determines How WordPress Comments Behave? - KnownHost\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.knownhost.com\\\/kb\\\/#website\"},\"datePublished\":\"2021-07-23T12:07:18+00:00\",\"dateModified\":\"2023-03-10T18:40:20+00:00\",\"author\":{\"@id\":\"https:\\\/\\\/www.knownhost.com\\\/kb\\\/#\\\/schema\\\/person\\\/3db6e20d1f33519cd68fe0ba1230a48b\"},\"description\":\"Are you looking for a way to make changes to your WordPress comments? In this guide we will show you what part controls WordPress comments.\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.knownhost.com\\\/kb\\\/what-code-determines-how-wordpress-comments-behave\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.knownhost.com\\\/kb\\\/what-code-determines-how-wordpress-comments-behave\\\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.knownhost.com\\\/kb\\\/what-code-determines-how-wordpress-comments-behave\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.knownhost.com\\\/kb\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"What Code Determines How WordPress Comments Behave?\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.knownhost.com\\\/kb\\\/#website\",\"url\":\"https:\\\/\\\/www.knownhost.com\\\/kb\\\/\",\"name\":\"KnownHost\",\"description\":\"KnownHost provides a comprehensive webhosting knowledge base to help answer many of your common webhosting and linux questions.\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.knownhost.com\\\/kb\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/www.knownhost.com\\\/kb\\\/#\\\/schema\\\/person\\\/3db6e20d1f33519cd68fe0ba1230a48b\",\"name\":\"Jonathan K. W.\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/f432b99e6651fe8d1deb57a285bd84e806f1c9ae8b4c6c585d7e3a0b33789ad9?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/f432b99e6651fe8d1deb57a285bd84e806f1c9ae8b4c6c585d7e3a0b33789ad9?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/f432b99e6651fe8d1deb57a285bd84e806f1c9ae8b4c6c585d7e3a0b33789ad9?s=96&d=mm&r=g\",\"caption\":\"Jonathan K. W.\"},\"sameAs\":[\"https:\\\/\\\/www.knownhost.com\"]}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"What Code Determines How WordPress Comments Behave? - KnownHost","description":"Are you looking for a way to make changes to your WordPress comments? In this guide we will show you what part controls WordPress comments.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.knownhost.com\/kb\/what-code-determines-how-wordpress-comments-behave\/","og_locale":"en_US","og_type":"article","og_title":"What Code Determines How WordPress Comments Behave? - KnownHost","og_description":"Are you looking for a way to make changes to your WordPress comments? In this guide we will show you what part controls WordPress comments.","og_url":"https:\/\/www.knownhost.com\/kb\/what-code-determines-how-wordpress-comments-behave\/","og_site_name":"KnownHost","article_published_time":"2021-07-23T12:07:18+00:00","article_modified_time":"2023-03-10T18:40:20+00:00","author":"Jonathan K. W.","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Jonathan K. W.","Est. reading time":"4 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.knownhost.com\/kb\/what-code-determines-how-wordpress-comments-behave\/#article","isPartOf":{"@id":"https:\/\/www.knownhost.com\/kb\/what-code-determines-how-wordpress-comments-behave\/"},"author":{"name":"Jonathan K. W.","@id":"https:\/\/www.knownhost.com\/kb\/#\/schema\/person\/3db6e20d1f33519cd68fe0ba1230a48b"},"headline":"What Code Determines How WordPress Comments Behave?","datePublished":"2021-07-23T12:07:18+00:00","dateModified":"2023-03-10T18:40:20+00:00","mainEntityOfPage":{"@id":"https:\/\/www.knownhost.com\/kb\/what-code-determines-how-wordpress-comments-behave\/"},"wordCount":524,"keywords":["blogs","cms","wordpress"],"articleSection":["WordPress"],"inLanguage":"en-US"},{"@type":"WebPage","@id":"https:\/\/www.knownhost.com\/kb\/what-code-determines-how-wordpress-comments-behave\/","url":"https:\/\/www.knownhost.com\/kb\/what-code-determines-how-wordpress-comments-behave\/","name":"What Code Determines How WordPress Comments Behave? - KnownHost","isPartOf":{"@id":"https:\/\/www.knownhost.com\/kb\/#website"},"datePublished":"2021-07-23T12:07:18+00:00","dateModified":"2023-03-10T18:40:20+00:00","author":{"@id":"https:\/\/www.knownhost.com\/kb\/#\/schema\/person\/3db6e20d1f33519cd68fe0ba1230a48b"},"description":"Are you looking for a way to make changes to your WordPress comments? In this guide we will show you what part controls WordPress comments.","breadcrumb":{"@id":"https:\/\/www.knownhost.com\/kb\/what-code-determines-how-wordpress-comments-behave\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.knownhost.com\/kb\/what-code-determines-how-wordpress-comments-behave\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.knownhost.com\/kb\/what-code-determines-how-wordpress-comments-behave\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.knownhost.com\/kb\/"},{"@type":"ListItem","position":2,"name":"What Code Determines How WordPress Comments Behave?"}]},{"@type":"WebSite","@id":"https:\/\/www.knownhost.com\/kb\/#website","url":"https:\/\/www.knownhost.com\/kb\/","name":"KnownHost","description":"KnownHost provides a comprehensive webhosting knowledge base to help answer many of your common webhosting and linux questions.","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.knownhost.com\/kb\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/www.knownhost.com\/kb\/#\/schema\/person\/3db6e20d1f33519cd68fe0ba1230a48b","name":"Jonathan K. W.","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/f432b99e6651fe8d1deb57a285bd84e806f1c9ae8b4c6c585d7e3a0b33789ad9?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/f432b99e6651fe8d1deb57a285bd84e806f1c9ae8b4c6c585d7e3a0b33789ad9?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/f432b99e6651fe8d1deb57a285bd84e806f1c9ae8b4c6c585d7e3a0b33789ad9?s=96&d=mm&r=g","caption":"Jonathan K. W."},"sameAs":["https:\/\/www.knownhost.com"]}]}},"_links":{"self":[{"href":"https:\/\/www.knownhost.com\/kb\/wp-json\/wp\/v2\/posts\/1339","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.knownhost.com\/kb\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.knownhost.com\/kb\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.knownhost.com\/kb\/wp-json\/wp\/v2\/users\/4"}],"replies":[{"embeddable":true,"href":"https:\/\/www.knownhost.com\/kb\/wp-json\/wp\/v2\/comments?post=1339"}],"version-history":[{"count":0,"href":"https:\/\/www.knownhost.com\/kb\/wp-json\/wp\/v2\/posts\/1339\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.knownhost.com\/kb\/wp-json\/wp\/v2\/media?parent=1339"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.knownhost.com\/kb\/wp-json\/wp\/v2\/categories?post=1339"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.knownhost.com\/kb\/wp-json\/wp\/v2\/tags?post=1339"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}