I think it could be a problem with get_comments_number
which returns numeric, though theoretically it should test this way too… you could try instead:
if ( comments_open() || have_comments() ) :
comments_template();
endif;
OR
if ( comments_open() || (get_comments_number() > 0) ) :
comments_template();
endif;
Related Posts:
- Display latest comments on page with pagination
- How do I turn comments off for pages, but not posts?
- How can I make Disqus comments not show up on pages?
- Related Links Page with moderated, user suggested link submissions
- How to call wp_list_comments() outside of the comments template?
- Loading Multiple Comments Pages via Ajax?
- Remove comment section from new page
- Dynamic page with comments
- Get rid of “comment” field on non-blog pages [duplicate]
- How to fix broken URL – https://mywebsite.com/comments/feed/
- Display latest comments (global) with replies on a page
- Is it better to set social media sharer in entry-footer.php or comments.php in WordPress blog?
- WordPress Pages “allow comments” meta option can’t be checked
- How to configure WordPress to handle 75,000 pages?
- What is the difference between $paged and $page?
- multi page password protection
- Create a “Dummy” parent page for a hierarchy in page listing?
- Why are default comments deprecated?
- Custom SQL Query for WordPress page
- Comments Reply Form
- Change admin startpage to Pages-page?
- Password protected post or page – error message by wrong password?
- How restrict page for users logged? [closed]
- Only allow new subpages to be created
- Hide Visibility Option From WordPress Publish Metabox
- WordPress 4 and wp_editor() Not Showing Visual/Text tabs
- adding a text message beside the comment submit button
- How to make nested page structure?
- How to save new comment as custom comment type?
- Redirect to a page if ancestors is empty
- Get Order of Meta Box in a Page/Post
- Check to see if page exists problems
- Modify Page Title before output via wp_page_list
- Custom /page/2/ template (different from index.php)
- Front Page not showing on Pages
- WordPress pages with hierarchy
- How to incorporate Documentation into wordpress?
- Two Search pages, One search form
- Why doesnt ONE of my links in the footer work properly? [closed]
- Create subpage – filter parent pages list
- Use lots of pages, or categories/posts?
- How to have custom tinyMCE buttons break onto next line when too long
- Get all pages that are published
- Add a predefined page to site
- How do i change page template in bulk?
- Determine page content based on page parent
- Weird issue with is_pages() with array
- Missing ‘Page Attributes’ in page edit
- How to show the root webpage on all subpaths
- Could be a namespace conflict (?) with login form and register form on the same page
- The concept of non-blog content
- Change base URL of pages created by certain users
- Remove Content edit box from ALL pages (not posts)
- What is full URL for a post?
- How to create a page and display only the posts with a specific custom field value?
- WordPress pages not working out correctly with HTML
- Comments on future posts
- Use page template for custom $_GET content
- Returning error upon comment being flagged as spam
- Custom page only editable by one user
- Page Title repeating
- Password Protect Pages Not Working
- Can I connect a page to a taxonomy?
- wp_nav_menu: output featured image of each page listing
- Prompting for review / reapproval of page content
- Limit the amount of main pages
- Change displayed “page name” to distinguish multiple pages with the same title
- Add separate list of pages under Admin
- Changing the Comment Fields using Filter (without success)
- How to transfer a site to hosting?
- How to list pages from an author?
- Add the same content to multiple pages
- Share a folder with files
- Front Page post mirroring revisions to other pages, constantly updating itself
- Microsoft Security Essentials is blocking my WordPress website in IE11
- Author information on all pages
- Display inner pages like posts.[Like how post excerpt works]
- include exception inside theme for empty widget area
- Add role and edit page capabilities
- Add text to the bottom of particular pages
- Access wordpress pages using a self signed shared ssl
- Page loads all pages of the image gallery with pagination
- Comment form – different title if no comment yet
- WordPress, page 2 shows the same posts as page 1
- WordPress Comments jQuery Doesn’t submit
- Insert comment and still use moderation
- How to exclude page in pages module
- get id custom tables on current page
- Create a new page for each form selection
- pagination does not work with query_posts. Help! [duplicate]
- Subpage Conditional
- Multiple WordPress Pages
- How to pass the Querystring in pages?
- I have over 3000 child pages – but I need a different main page
- How to enable automatic search results in WordPress
- How to make a conditional statement that checks if the page is the child of a certain page?
- Edit the text location of a form
- Missing page on wordpress “Pages” dashboard [closed]
- I reached halfway through a WordPress tutorial to find out I began wrong for a new comer to WP
- Can’t create new pages in wordpress