OK I think I figured this out…
add_action( 'init', array( &$this, 'no_comments' ) );
function no_comments() {
add_filter( 'get_comments_number', '__return_false' );
}
Removes the comment count and the comments themselves
Related Posts:
- Writing a plugin that notify my friends of new post that mentions(@) them
- Why are two functions over-riding each other?
- Comment `Reply` link doesn’t work if comments are loaded from ajax
- comment_email hook doesn’t seem to work for comment editor field
- Show comments fields in two columns
- preprocess_comment array doesn’t have comment_ID
- How do I alter the comment form ‘allowed tags’ text in a plugin?
- Can wp_list_comments output into variable?
- Comments do not respect display_name setting, how to make plugin to overcome this
- $reverse_top_level works the opposite way according to Codex?
- How to integrate CLEditor to comment system?
- Get attachments from a post
- is pre_get_comments not working?
- How to replace default comments with custom HTML?
- Custom avatars in wordpress comments?
- how to load the comment template from a plugin
- How to get the number of pages when paginating comments?
- How does “Your comment is awaiting moderation” work?
- how to get the top 10 popular blogs
- disable defaault wordpress comments from a plugin
- How to show comments from different Plugins to same post type?
- How to check if `comment_meta` exists before inserting the comment?
- How to get the `comment_post_ID`?
- Email content as comment
- Get Commentor IP When Marking Comment As Spam
- isset($_POST[‘submit’]) ignored on comment submission
- $_POST form request with admin-post
- How can I configure Docker for developing and deploying a custom theme?
- Add screen options to custom admin pages
- Completely remove WP_Admin_Bar for specific user roles
- What is the difference between using global $current_screen and get_current_screen()?
- How to make repeated component/block in Gutenberg
- How can I change the frequency of a scheduled event?
- How to filter $post->post_content prior to save
- How to get data from WordPress $wpdb into React Gutenberg Blocks Frontend?
- How to check if certain plugin exists and in expected version
- Why won’t register_setting() create a setting?
- One time username change from frontend?
- Customizer Not Saving Options
- How to extend a plugin like we do a theme?
- How to add custom text in wordpress logs
- How can I call template partials inside my custom plugin
- WordPress REST API, run long background job
- How to store a medium amount of options?
- Get the post id as early as possible
- Custom plugin changes not showing
- Beginner advice
- How To Prevent Certain Folder To Be Overwritten During Plugin Update?
- Prefixing plugin hooks (actions/filters) with a wrapper class or functions
- get_option() not returning expected value from plugin
- Testing Rewrite Rules with PHPUnit
- Including third party libraries in plugin [closed]
- What action hook can I use to add a JavaScript to a page post using a theme template that is not including get_header() nor get_footer()?
- should i be checking for jquery before enqueing it in a plugin
- WordPress Specified file failed upload test
- WordPress theme options Menu
- Move some files of plugin to the root directory with plugin activation
- Can’t retrieve body params from PUT endpoint using formdata
- enabling Twig as Template Engine withing own plugin [closed]
- Unable to get a simple plugin admin page to work
- Set _regular_price 0 if empty in woocommerce product
- How do I get rid of my inclusion race-condition on wp_enqueue_script
- AJAX call to admin-ajax.php by subscriber returns home page
- Can I Hook Into the TinyMCE Insert/Edit Link Button to Use Shortlink For Post?
- Ajax function is not working on WordPress
- Best way to ping for the API changes in the wordpress?
- Writing editor content to a file
- Create an user on external database
- Form submission to another page returning 404 error [duplicate]
- How do i remove the title from a specific page
- Widget internal hooks and functions
- Why does website stretch and white space on load? [duplicate]
- check_admin_referer()
- Creating an ics calendar from custom post type
- How to create a custom wordpress plugin
- Twenty-seventy theme remove additional CSS from head
- WordPress delete mysql rows with string
- WordPress Plugin: OSCommerce images not displaying in front end
- How put the correct URL to sub-menu plugin?
- Let user override plugin CSS
- Add_menu_page and saving settings
- add short code not working
- What method would I use to show an image in between X amount of posts on category archive? [duplicate]
- Find Any Theme’s page.php File
- WP Job Manager – Show recent jobs as cards
- How will i add an option under customizer the event calendar section?
- Return custom product in ajax call loop
- Is there a canonical way for a plugin to install a mu-plugin or drop-in?
- How can create a custom plugin to call my webapi after any registration or membership plugin functionality
- Admin Menu for New Post
- Elementor Top-Bar
- Is it possible to add Custom Dashboard Widgets to Custom Admin Menu Page?
- Is using upgrader_process_complete the correct way to perform plugin updates?
- Load images from CDN and custom features to “Add Media” dialogue
- Saving metabox updates causing fatal error
- Calling get_header() with installed FSE theme
- Reinitiate Gutenburg’s blocks using javascript
- Generating Multiple Divi Pages from Database
- Is it smart to require_once wp-admin/includes/plugin.php when you need only one function from it
- multiple record insert creating many duplicate records