Please try this:
$args = array(
'number' => 100,
'status' => 'approve',
'post_status' => 'publish',
'post_type' => 'product'
);
$comments = get_comments( $args );
where you can edit the number of comments to your needs.
Debug:
Maybe something is changing it via the pre_get_comments
hook?
To debug it you can check out the SQL query with:
global $wpdb;
printf( '<pre>%s</pre>', $wpdb->last_query );
where you add this directly below the above get_comments()
code snippet.
Also check the edit-comments.php
screen if the comments show up there and their status.
Related Posts:
- Delete tables from database when deleting plugin
- Can I upgrade a plugin to a specific version?
- Get plugin_dir_url() from one level deep within plugin
- How to have WordPress send a user confirmation/validation email on signup
- How do I disable a plugin enforced by my host (in mu-plugins)?
- Do Plugins effect site loading time?
- Adding Featured Image in Post List
- How to place random widgets in the WordPress sidebar?
- Auto login using Active Directory and Windows Authentication
- Should I use RIPS tool to test my themes and plugins?
- Plugin search sorting for admin section – WordPress [duplicate]
- How to disable autocomplete for inputs in contact form 7? [closed]
- Determining where fopen() is writing files when used from WordPress AJAX call [closed]
- How Restrict access to admin dashboard by specific static ip?
- Plugin Functionality Only for Editor and Administrator
- Plugin to hide admin menu (vertical menu bar)
- Creating Custom Roles for use on a WordPress Multi-site Instance?
- Building WordPress Plugin Using FPDF – How do you get post content from currently viewed post?
- Storing Email Account Passwords for SMTP Mailing for a WordPress Plugin
- action-scheduler vs wp-background-processing
- How to get images from EDD post?
- Do you clean up your self-written plugins’ at deactivation?
- Function to see how many plugins on a site need updating
- PHP Fatal error: Call to undefined function plugin_basename
- Restored WordPress on new Server – Can’t auto-update plugins
- How many SQL queries WP Super Cache make to serve cached page?
- omit / remove ” from category list
- Is any information available in PHP files in WP about plugin activation history?
- Download any file after submitting a form [closed]
- Call to undefined function get_userdata in user.php
- Use flash on a wordpress site as a widget
- AJAX search posts and pages
- (Sticky Row) How do i make a row sticky in wpbakery page builder?
- how to create progress bar in wordpress contact form 7 or other plugin for set progress bar in cf7 [closed]
- remove_section in a plugin
- How to export all content with feature images?
- Cron Job not working in plugin
- this jQuery function works perfect in static html page but not on wordpress
- Run a plugin just ‘once’ per page reload
- How do I add content to the dashboard in WordPress?
- Is it possible for a plugin to force reading and writing of uploaded images to a database instead of to a filesystem?
- $wpdb update query in plugin only updating one column
- How to multiply a post to test internal search results?
- Plugins for logo in wp themes? [closed]
- Is there a plugin for automatically adding a word or symbol after a trigger word? I.e. Like a search and replace but more like search and add? [closed]
- Product count in archive page Title in WooCommerce [closed]
- How to display the featured post on the category page?
- Disable globally “Crop thumbnail to exact dimensions (normally thumbnails are proportional)” with Multisite
- UTF-32be error WordPress
- wp-admin send 404 error
- How I update WordPress theme and plugins
- WordPress Mailerlite – How to include mailerlite SDK in plugin
- How to request admin-ajax.php correctly when wordpress URL and site URL are different?
- Installed Forca Theme, wonder how I can alter Post editing screen
- How to Use the Filter “sidebar_login_widget_form_args”
- How can i listing current category and Featured Category post list?
- Contact Form 7: Load scripts and styles only when there is shortcode? [closed]
- How to theme code blocks formatted by the prettify.js embedded with WP-Markdown?
- Posts 2 Posts: Display custom types connected to the same other custom type but with another connection
- Is there a syntax highlighting plugin for HTML View? [duplicate]
- Hide plugins and theme from public
- Same Plugin tables between wordpress installations
- How would I get the new plugin version on this function?
- acf backend error handling
- How to get the custom field value using SQL query
- Changing wordpress/woocommerce notices default message to other languages (text)
- Why does my custom plugin only function correctly once per page?
- Homepage to serve the content of page created from a plugin [duplicate]
- How to get checkbox by default true in metabox?
- Conditionally load public and admin code with AJAX working on both sides
- Custom plugin settings page with tab. Error: “Sorry, you are not allowed to access this page.”
- I can’t view the orders on the woocomerce dashboard with the brainblocks plugin
- return bbp_get_topic_author_id as integer
- How to add a box note in wordpress plugin page ? top header side.
- Why can’t I call a function from inside my registered AJAX function?
- Help needed with woocommerce (wc stripe) filter
- I want add repository theme folder
- WordPress Widget: Is it possible to make the form dynamic without updating?
- Custom on the fly e-mail alerts
- How set role at registration based on email?
- Site is continuously accessing by several IPs
- Why did a WordPress plugin vanish from the WordPress repository?
- Moving to WordPress Premium versus a hosting provider
- How to find an option in the database?
- Need Help Creating a Multi-Step, Video-Guided Enrollment Site
- woocommerce_payment_complete hook only called after accepting payment?
- how to sort results by last day update at search result in plugin installer?
- User specific content (posts) / limiting visibility
- Carrying information from button click into form [closed]
- My AJAX API plugin isn’t working
- Want to add post to user dashboard
- How to hide a piece of code from a wordpress web page?
- Make a magic tag work with Custom Post Types
- Bidding site plugin [closed]
- WordPress Plugin: Demon Image Annotation
- Editing a theme
- woocommerce create subscription for user using functions / hooks provided
- How to add product author carousel in wordpress? [closed]
- Meta box not displaying on the plugin page
- public custom posts not showing in my wordpress plugin