{"id":7452,"date":"2009-05-13T22:39:29","date_gmt":"2009-05-13T17:09:29","guid":{"rendered":"https:\/\/www.quickonlinetips.com\/archives\/?p=7452"},"modified":"2026-10-28T17:28:25","modified_gmt":"2026-10-28T11:58:25","slug":"separate-trackbacks-style-comments-in-wordpress-27","status":"publish","type":"post","link":"https:\/\/www.quickonlinetips.com\/archives\/2009\/05\/separate-trackbacks-style-comments-in-wordpress-27\/","title":{"rendered":"How to Separate Trackbacks from Comments and Style Comments in WordPress (2026)"},"content":{"rendered":"<p>How do you <strong>separate trackbacks from comments in WordPress<\/strong>, hide pingbacks, and style your comments so they are easy to read? Pingbacks and trackbacks are automatic notices from other blogs that linked to your post, and mixed in with real comments they clutter the discussion. Here are the easy settings, the CSS-only fix and the classic theme code that still work in WordPress in 2026.<\/p>\n<p><img decoding=\"async\" class=\"aligncenter size-full wp-image-68610\" src=\"https:\/\/www.quickonlinetips.com\/archives\/wp-content\/uploads\/separate-trackbacks-style-comments-wordpress.webp\" alt=\"Colourful speech bubbles, like WordPress comments\" width=\"1200\" height=\"630\" srcset=\"https:\/\/www.quickonlinetips.com\/archives\/wp-content\/uploads\/separate-trackbacks-style-comments-wordpress.webp 1200w, https:\/\/www.quickonlinetips.com\/archives\/wp-content\/uploads\/separate-trackbacks-style-comments-wordpress-300x158.webp 300w, https:\/\/www.quickonlinetips.com\/archives\/wp-content\/uploads\/separate-trackbacks-style-comments-wordpress-1024x538.webp 1024w, https:\/\/www.quickonlinetips.com\/archives\/wp-content\/uploads\/separate-trackbacks-style-comments-wordpress-150x79.webp 150w, https:\/\/www.quickonlinetips.com\/archives\/wp-content\/uploads\/separate-trackbacks-style-comments-wordpress-768x403.webp 768w\" sizes=\"(max-width: 1200px) 100vw, 1200px\" \/><\/p>\n<p><strong>Quick answer:<\/strong> To stop new pingbacks, untick &#8220;Allow link notifications from other blogs (pingbacks and trackbacks) on new posts&#8221; in Settings &gt; Discussion. To hide existing ones, add CSS that hides the pingback and trackback classes. In a classic theme, call <code>wp_list_comments()<\/code> twice with type comment and type pings to show them in separate lists, and style comments with the classes WordPress adds to each one.<\/p>\n<div id=\"ez-toc-container\" class=\"ez-toc-v2_0_89 counter-hierarchy ez-toc-counter ez-toc-custom ez-toc-container-direction\">\n<p class=\"ez-toc-title\" style=\"cursor:inherit\">Table of Contents<\/p>\n<label for=\"ez-toc-cssicon-toggle-item-6ae7fe0fec31c\" class=\"ez-toc-cssicon-toggle-label\"><span class=\"ez-toc-cssicon\"><span class=\"eztoc-hide\" style=\"display:none;\">Toggle<\/span><span class=\"ez-toc-icon-toggle-span\"><svg style=\"fill: #1a202c;color:#1a202c\" 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: #1a202c;color:#1a202c\" 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><\/label><input type=\"checkbox\"  id=\"ez-toc-cssicon-toggle-item-6ae7fe0fec31c\" checked aria-label=\"Toggle\" \/><nav><ul class='ez-toc-list ez-toc-list-level-1 ' ><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-1\" href=\"https:\/\/www.quickonlinetips.com\/archives\/2009\/05\/separate-trackbacks-style-comments-in-wordpress-27\/#Pingbacks_and_trackbacks_vs_comments\" >Pingbacks and trackbacks vs comments<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-2\" href=\"https:\/\/www.quickonlinetips.com\/archives\/2009\/05\/separate-trackbacks-style-comments-in-wordpress-27\/#Method_1_Turn_off_pingbacks_and_trackbacks_no_code\" >Method 1: Turn off pingbacks and trackbacks (no code)<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-3\" href=\"https:\/\/www.quickonlinetips.com\/archives\/2009\/05\/separate-trackbacks-style-comments-in-wordpress-27\/#Method_2_Hide_pingbacks_with_CSS\" >Method 2: Hide pingbacks with CSS<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-4\" href=\"https:\/\/www.quickonlinetips.com\/archives\/2009\/05\/separate-trackbacks-style-comments-in-wordpress-27\/#Method_3_Show_comments_and_pings_separately_in_a_classic_theme\" >Method 3: Show comments and pings separately in a classic theme<\/a><ul class='ez-toc-list-level-3' ><li class='ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-5\" href=\"https:\/\/www.quickonlinetips.com\/archives\/2009\/05\/separate-trackbacks-style-comments-in-wordpress-27\/#Count_only_real_comments\" >Count only real comments<\/a><\/li><\/ul><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-6\" href=\"https:\/\/www.quickonlinetips.com\/archives\/2009\/05\/separate-trackbacks-style-comments-in-wordpress-27\/#How_to_style_comments_in_WordPress\" >How to style comments in WordPress<\/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.quickonlinetips.com\/archives\/2009\/05\/separate-trackbacks-style-comments-in-wordpress-27\/#FAQ\" >FAQ<\/a><ul class='ez-toc-list-level-3' ><li class='ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-8\" href=\"https:\/\/www.quickonlinetips.com\/archives\/2009\/05\/separate-trackbacks-style-comments-in-wordpress-27\/#Should_I_disable_pingbacks_in_WordPress\" >Should I disable pingbacks in WordPress?<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-9\" href=\"https:\/\/www.quickonlinetips.com\/archives\/2009\/05\/separate-trackbacks-style-comments-in-wordpress-27\/#Does_hiding_pingbacks_delete_them\" >Does hiding pingbacks delete them?<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-10\" href=\"https:\/\/www.quickonlinetips.com\/archives\/2009\/05\/separate-trackbacks-style-comments-in-wordpress-27\/#How_do_I_stop_self-pings\" >How do I stop self-pings?<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-11\" href=\"https:\/\/www.quickonlinetips.com\/archives\/2009\/05\/separate-trackbacks-style-comments-in-wordpress-27\/#Does_this_work_in_block_themes\" >Does this work in block themes?<\/a><\/li><\/ul><\/li><\/ul><\/nav><\/div>\n<h2><span class=\"ez-toc-section\" id=\"Pingbacks_and_trackbacks_vs_comments\"><\/span>Pingbacks and trackbacks vs comments<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<ul>\n<li><strong>Comments<\/strong> are written by your readers.<\/li>\n<li><strong>Pingbacks<\/strong> are sent automatically when another WordPress site links to your post.<\/li>\n<li><strong>Trackbacks<\/strong> are an older, manual version of the same idea.<\/li>\n<\/ul>\n<p>Today most pings are self-pings (your own internal links) or spam, which is why many site owners turn them off or keep them out of the comment thread. Spam and thin comments can also make pages look low quality; see our post on <a href=\"https:\/\/www.quickonlinetips.com\/archives\/2014\/06\/separate-wordpress-comments-to-fix-google-panda-penalty\/\">WordPress comments and SEO<\/a>.<\/p>\n<h2><span class=\"ez-toc-section\" id=\"Method_1_Turn_off_pingbacks_and_trackbacks_no_code\"><\/span>Method 1: Turn off pingbacks and trackbacks (no code)<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<ol>\n<li>Go to <strong>Settings &gt; Discussion<\/strong>.<\/li>\n<li>Untick <strong>Allow link notifications from other blogs (pingbacks and trackbacks) on new posts<\/strong>.<\/li>\n<li>Optionally untick <strong>Attempt to notify any blogs linked to from the post<\/strong> if you don&#8217;t want to send pings yourself.<\/li>\n<li>For existing posts, open <strong>Posts<\/strong>, select posts, choose <strong>Bulk actions &gt; Edit<\/strong> and set <strong>Pings<\/strong> to <em>Do not allow<\/em>.<\/li>\n<\/ol>\n<p>Pingbacks already approved stay on your posts; delete them from <strong>Comments<\/strong> (filter by type Pings) or hide them with Method 2.<\/p>\n<h2><span class=\"ez-toc-section\" id=\"Method_2_Hide_pingbacks_with_CSS\"><\/span>Method 2: Hide pingbacks with CSS<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>WordPress adds the class <code>pingback<\/code> or <code>trackback<\/code> to each ping in the comment list in most themes, so one CSS rule hides them without touching theme files. Add it in <strong>Appearance &gt; Customize &gt; Additional CSS<\/strong> (classic themes) or the Site Editor&#8217;s custom CSS (block themes):<\/p>\n<pre><code>.comment-list .pingback,\n.comment-list .trackback {\n  display: none;\n}<\/code><\/pre>\n<p>The pings are still stored; they are just not displayed. Check the class name of the list in your theme (often <code>comment-list<\/code> or <code>commentlist<\/code>) and adjust the rule if needed. Note that the comment count in your theme may still include the hidden pings (see Method 3).<\/p>\n<h2><span class=\"ez-toc-section\" id=\"Method_3_Show_comments_and_pings_separately_in_a_classic_theme\"><\/span>Method 3: Show comments and pings separately in a classic theme<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>This is the method from our original 2009 tutorial, still valid in classic (PHP) themes. Use a child theme so updates don&#8217;t overwrite your changes. In <strong>comments.php<\/strong>, replace the single comment list with two lists:<\/p>\n<pre><code>&lt;?php if ( have_comments() ) : ?&gt;\n  &lt;h2 class=\"comments-title\"&gt;Comments&lt;\/h2&gt;\n  &lt;ol class=\"comment-list\"&gt;\n    &lt;?php wp_list_comments( array( 'type' =&gt; 'comment', 'style' =&gt; 'ol' ) ); ?&gt;\n  &lt;\/ol&gt;\n\n  &lt;h3 id=\"pings\"&gt;Trackbacks and pingbacks&lt;\/h3&gt;\n  &lt;ol class=\"ping-list\"&gt;\n    &lt;?php wp_list_comments( array( 'type' =&gt; 'pings', 'short_ping' =&gt; true ) ); ?&gt;\n  &lt;\/ol&gt;\n&lt;?php endif; ?&gt;<\/code><\/pre>\n<p>To hide pings completely instead, simply leave out the second list: they are still recorded, just not displayed.<\/p>\n<h3><span class=\"ez-toc-section\" id=\"Count_only_real_comments\"><\/span>Count only real comments<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p>Your theme&#8217;s comment count includes pings. This filter in your child theme&#8217;s <strong>functions.php<\/strong> makes the front-end count show real comments only:<\/p>\n<pre><code>add_filter( 'get_comments_number', 'qot_count_real_comments', 10, 2 );\nfunction qot_count_real_comments( $count, $post_id ) {\n  if ( is_admin() ) {\n    return $count;\n  }\n  return (int) get_comments( array(\n    'post_id' =&gt; $post_id,\n    'status'  =&gt; 'approve',\n    'type'    =&gt; 'comment',\n    'count'   =&gt; true,\n  ) );\n}<\/code><\/pre>\n<p>Full options for the comment list are in the <a href=\"https:\/\/developer.wordpress.org\/reference\/functions\/wp_list_comments\/\" target=\"_blank\" rel=\"noopener\">wp_list_comments() reference<\/a>.<\/p>\n<h2><span class=\"ez-toc-section\" id=\"How_to_style_comments_in_WordPress\"><\/span>How to style comments in WordPress<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>WordPress adds useful classes to every comment, so you can style them with CSS alone:<\/p>\n<ul>\n<li><code>.comment<\/code>, <code>.pingback<\/code>, <code>.trackback<\/code>: the type of each item.<\/li>\n<li><code>.even<\/code> and <code>.odd<\/code>: alternate comments, for zebra stripes.<\/li>\n<li><code>.bypostauthor<\/code>: comments by the post&#8217;s author, so you can highlight your replies.<\/li>\n<li><code>.children<\/code> and <code>.depth-2<\/code>, <code>.depth-3<\/code>: replies in threaded comments.<\/li>\n<li><code>.comment-meta<\/code>, <code>.comment-author<\/code>, <code>.reply<\/code>: the parts of each comment.<\/li>\n<\/ul>\n<p>For example, this CSS adds spacing, alternate backgrounds and a highlight for the author&#8217;s replies:<\/p>\n<pre><code>.comment-list { list-style: none; margin: 0 0 1em; padding: 0; }\n.comment-list .comment { border-bottom: 1px dotted #999; padding: 1em; }\n.comment-list .even { background: #fff; }\n.comment-list .odd { background: #f6f6f6; }\n.comment-list .bypostauthor &gt; article { border-left: 4px solid #F28C1E; padding-left: 0.75em; }<\/code><\/pre>\n<p>Use your browser&#8217;s Inspect tool on a post with comments to see the exact classes your theme outputs. In block themes, you can also style the Comments block and its inner blocks (author name, date, content, reply link) in the Site Editor under <strong>Styles &gt; Blocks<\/strong>.<\/p>\n<p>Want faster pages with lots of comments? See how to <a href=\"https:\/\/www.quickonlinetips.com\/archives\/2021\/01\/lazy-load-comments-in-wordpress-blogs\/\">lazy load comments in WordPress<\/a>.<\/p>\n<h2><span class=\"ez-toc-section\" id=\"FAQ\"><\/span>FAQ<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<h3><span class=\"ez-toc-section\" id=\"Should_I_disable_pingbacks_in_WordPress\"><\/span>Should I disable pingbacks in WordPress?<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p>For most blogs, yes. Real pingbacks are rare today and most are self-pings or spam.<\/p>\n<h3><span class=\"ez-toc-section\" id=\"Does_hiding_pingbacks_delete_them\"><\/span>Does hiding pingbacks delete them?<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p>No. Hiding them with CSS or theme code only stops them showing. Delete them from the Comments screen if you want them gone.<\/p>\n<h3><span class=\"ez-toc-section\" id=\"How_do_I_stop_self-pings\"><\/span>How do I stop self-pings?<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p>Turn off &#8220;Attempt to notify any blogs linked to from the post&#8221; in Settings &gt; Discussion, or use a small plugin that blocks pings to your own domain.<\/p>\n<h3><span class=\"ez-toc-section\" id=\"Does_this_work_in_block_themes\"><\/span>Does this work in block themes?<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p>The settings and CSS methods work in any theme. The comments.php code is for classic themes only.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>How do you separate trackbacks from comments in WordPress, hide pingbacks, and style your comments so they are easy to&#8230;<\/p>\n","protected":false},"author":4,"featured_media":68610,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_kad_post_transparent":"","_kad_post_title":"","_kad_post_layout":"","_kad_post_sidebar_id":"","_kad_post_content_style":"","_kad_post_vertical_padding":"","_kad_post_feature":"","_kad_post_feature_position":"","_kad_post_header":false,"_kad_post_footer":false,"_kad_post_classname":"","footnotes":""},"categories":[6],"tags":[49,17],"class_list":["post-7452","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-blogging","tag-tutorials","tag-wordpress"],"_links":{"self":[{"href":"https:\/\/www.quickonlinetips.com\/archives\/wp-json\/wp\/v2\/posts\/7452","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.quickonlinetips.com\/archives\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.quickonlinetips.com\/archives\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.quickonlinetips.com\/archives\/wp-json\/wp\/v2\/users\/4"}],"replies":[{"embeddable":true,"href":"https:\/\/www.quickonlinetips.com\/archives\/wp-json\/wp\/v2\/comments?post=7452"}],"version-history":[{"count":1,"href":"https:\/\/www.quickonlinetips.com\/archives\/wp-json\/wp\/v2\/posts\/7452\/revisions"}],"predecessor-version":[{"id":68611,"href":"https:\/\/www.quickonlinetips.com\/archives\/wp-json\/wp\/v2\/posts\/7452\/revisions\/68611"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.quickonlinetips.com\/archives\/wp-json\/wp\/v2\/media\/68610"}],"wp:attachment":[{"href":"https:\/\/www.quickonlinetips.com\/archives\/wp-json\/wp\/v2\/media?parent=7452"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.quickonlinetips.com\/archives\/wp-json\/wp\/v2\/categories?post=7452"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.quickonlinetips.com\/archives\/wp-json\/wp\/v2\/tags?post=7452"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}