First thing I would do to debug such case is printing $post->ID
just before printing the comment status. (And make sure if it is equal to 414 – the post you’re checking in DB)
I’m almost certain that somewhere in your page you make another wp_query and modify the global $post
variable. So when you’re printing the comment status it’s showing the real value but for different post.
If you do such wp_query, then you’ll have to remember to use wp_reset_postdata
after that loop, so the global $post
variable is restored to its original value.
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?
- Comment entry screen shows even though “Allow Comments” is unchecked
- Jetpack Comments with fall-back
- WP_Comment_Query – Get comments and answers separately
- Trackbacks not displaying
- Nested comments in WordPress theme
- 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?
- WordPress API Menu/Submenu Order
- What WP folder can I use to write files to?
- Can’t get staging site to display same way as live site. Completely stumped
- How to add default images for custom backgrounds?
- How to call the_excerpt() with tags or the_content() as an excerpt?
- Display a different theme for not logged-in users
- how to test a theme upgrade
- How to set path with WP_Filesystem and ftp base / chroot
- How to add paging to query
- what’s meaning of it when submit a theme?
- How to Modify a Widgets UL and/or LI Classes
- How to remove menus section from WordPress theme customizer
- Getting Permalink within the loop
- Allow users to add custom functions to wordpress theme
- What page should I use for a contact form?
- Get attachments by user
- Appending a value to metabox before and after saving
- How to hook CSS file according to theme selection in the customizer section
- I made a my own theme to WordPress and Admin Menu missing from frontend
- What program can I use to preview my wordpress site?
- How to remove a file included in parent theme with locate_template() via child theme?
- Can’t override template file in child theme
- wp_nav_menu add something before closing container and after last list item
- jQuery not available to other scripts
- WordPress Filtering Custom Post Type by Metadata and Search Heirachy
- What are the hooks in WordPress theme development?
- How can I override a require() used in functions.php of parent theme to my child theme
- Can I use WooCommerce in a headless CMS setup?
- underscores use of the article element on the page template
- Ideal inline dynamic CSS injection
- How to create and populate with few links a menu in child theme functions.php?
- Plugin does not work in custom theme
- How to Manually Code Shortcode?
- Making custom woo themes
- Where does the uploaded image go?
- Previous and Next links not populating, have I missed something?
- Single.php the_excerpt loads same as the_content not loading read more line
- Where to put custom page templates in theme?
- How to fix WordPress images not showing up in local hosted XAMPP server?
- Let user to add input fields on theme option page
- .current_page_ancestor broken in Twenty Eleven
- MapPress Easy Google Map in Jquery Tabs Problem
- Homepage slider not using correct images
- How to change listing type permlink?
- WordPress theme header.php should I add title meta?
- Problems with cart and pages on _s theme
- Creating a Single Page Theme correctly
- Custom post type query with pagination doesn’t work
- Fatal error: Class WP_Customize_Image_Control not found
- Edit Product Archive design for Woo theme
- How do I remove header/page-title image in farvis theme? [closed]
- Which theme PHP file should be edited in order to change Posts appearance
- Necessary css classes to be included in theme stylesheet
- How to link post image to post link?
- How to hide blog by id wordpress multisite listing
- jQuery conflict in WordPress, works fine in HTML
- Including some variables in function.php and echo them is several place of theme is not working
- How to override wordpress native options with theme options
- How to create multiple sidebar areas with a forloop and register_sidebars?
- Bootstrap isn’t called into my WordPress theme
- Adding a new layout for genesis
- Which function(s) to build a paged HTML table
- white spaces on the all sides [closed]
- Feeds are showing where Post archive page should be
- WordPress Two Level Filters on Getting Custom Taxonomy Terms
- I want to resize post featured image without cropping image. How?