As far as I remember main purpose of comments_template()
is to load template and specific logic should be handled inside that template.
Snippet from Twenty Ten comments.php
:
if ( ! comments_open() ) :
?>
<p class="nocomments"><?php _e( 'Comments are closed.', 'twentyten' ); ?></p>
<?php endif; // end ! comments_open() ?>
Related Posts:
- Nested comments ignored for max per page in wordpress
- Custom Comments – Parent / Nested Reply
- Why is styling comments so complex?
- Comment form not display properly?
- How to Auto Approve Comments on a Specific Page?
- comment_form() generates the wrong action url
- Customize comment list markup
- how to pull wordpress post comments to a external page
- Separated Comment from Post
- Remove “a href” from wp_list_comments()
- How to call wp_list_comments() with callback outside the loop
- How to get comment meta values by post ID
- Compact pingback list with favicons
- How to change i18n/l10n of #reply-title? (Old title: Comment reply link not working)
- How to remove comment link title attribute?
- Jetpack Comments with fall-back
- WP_Comment_Query – Get comments and answers separately
- Trackbacks not displaying
- Nested comments in WordPress theme
- Comment status shows ‘closed’ in db, but it shows ‘open’ when i echo it
- Difference between “comment_form_default_fields” AND “comment_form_fields”
- How to enable Disqus comments in a WordPress theme I’m creating from scratch? [closed]
- How to add custom class to get_avatar()
- Same comments on all posts
- WordPress Comment spam issue
- WordPress comments title
- Ajax Comment Upvotes – Votes don’t always register
- Modify comments_popup_link output
- Woocommerce Theme Reviews / Comments
- child comments not displaying as nested
- How can I fix the even/odd child classes comments so that the comments are unaffected by the top-level even/odd?
- wp_update_comment not working
- Recent posts with comment count in “Sidebar” template [closed]
- Is there a Function so that the author of the comment can delete his own comment?
- Does the functions.php file ever get called during an AJAX call? Debug AJAX
- Bestway To Define Theme and Plugin path and url
- Form to Add Posts to Custom Post Type
- How do I add settings to the Background Options Page?
- WordPress twentytwenty theme inline css overriding css body
- What is the problem if I use CDN in my WordPress parent theme(built using bootstrap)?
- Active theme responds to theme change request to alert user
- LOST in WP Template Hireachy
- Theme showing incorrect update
- Enabling Default Widgets in a Custom Theme
- changing Specific section background image in wordpress
- There’s an image named g.gif somewhere in my WordPress site
- How to highlight the current page in the nav menu?
- customizing the_password_form filter
- Whats the safest way to output custom JavaScript and Css code entered by the admin in the Theme Settings?
- Should I use language_attributes() or bloginfo(“language”) in html tag
- How to upload images using Settings API
- WordPress 404 page returning with default in IIS7
- Load child template based on parent
- How to make the_tags title translatable?
- Should I use include or load_template for including shortcodes, plugins and so on?
- Limit Loop to 5 Posts?
- Table of Contents Before first heading
- Theme-wide custom post template
- comment form args are not translatable (customized comment form)
- Zoom on custom theme without child
- Changing a slider to a grid [closed]
- What do with the index.php … [duplicate]
- How to add Space between sidebar and footer widget in WordPress theme [closed]
- Custom Navigation build using wp_nav_menu and walker
- Question regarding WP multisite feature
- “Theme without sidebar.php is deprecated”
- Is it acceptable for a WordPress theme to not accept widgets?
- Should all references to a text domain be to my current theme?
- my excerpts lack the ‘more’ link
- Simple child theme modification but links are broken
- Is functions.php in themes applied to all templates?
- Doing context-aware previews in the WordPress Customizer
- how do i develop a global nav and local nav to be wordpress dynamic?
- Why Tags don’t appear in my page?
- First post full width without Sidebar
- How to make a theme unable to be used on a multisite network?
- best practices for updating wordpress theme
- Multi Site Setup, Child Themes, Getting Style Sheet Directory
- if (has_custom_menu())?
- Exclude parent categories from the_category() within the loop
- How do I pass the category object to a function when is_archive() is true?
- Making a horizontal flyout menu from WordPress category listing
- getBoundingClientRect() showing different values on load vs scroll
- Ensure SQL changes carry over
- How can I set multi archive page template on same time for only one custom post type?
- Exclude categories from wp query not working
- Copying a modified theme from one wordpress site to another wordpress site [closed]
- Show Yoast SEO meta tags in Custom WordPress Templates (Theme)
- using themename_the_custom_logo() in template-tags?
- WordPress doesn’t load css, image and js files after moving local installation folder
- Customizer Image-Picker Preview Not Working
- How to get url image page the right way?
- Mobile view logo background colour in wordpress
- page.php is not called when I load a Page
- Main Menu Theme Different Output Print
- How to reuse parts of WordPress site e.g. header, footer, part of header for multiple WordPress sites?
- IS there any reason not to include javascript in my own post’s embeds?
- How to create more templates to the same theme?
- How do I middle-align my header menu items in WordPress [closed]
- How to Enable Hot Module Replacement with Webpack