you can try with this code. remove totally comment functionality in backed.
Put this code in your current theme function.php file.
<?php
// Removes from admin menu
add_action( 'admin_menu', 'my_remove_admin_menus' );
function my_remove_admin_menus() {
remove_menu_page( 'edit-comments.php' );
}
// Removes from post and pages
add_action('init', 'remove_comment_support', 100);
function remove_comment_support() {
remove_post_type_support( 'post', 'comments' );
remove_post_type_support( 'page', 'comments' );
}
// Removes from admin bar
function mytheme_admin_bar_render() {
global $wp_admin_bar;
$wp_admin_bar->remove_menu('comments');
}
add_action( 'wp_before_admin_bar_render', 'mytheme_admin_bar_render' );
?>
Related Posts:
- How does printf( __( ) ); work?
- Displaying Logged-In User Name in WordPress Menu
- Change the filename format of saved featured images
- How to use wp_insert_user on WordPress Multisite?
- How do I add a php statement to a jQuery string
- Upload images and attachments from frontend form
- Config apple-app-site-association file with wordpress
- How to use the php if statement [closed]
- Should I use wp_mail or PHP’s mail? [duplicate]
- Successful or Error Message after running mysql code in functions.php
- How can one utilize a variable as a callback function name for add_settings_field
- Link to file in plugin directory from wordpress template?
- Using a switch statement in WordPress
- Insert array data on plugin activation
- Auto crop images in WordPress
- Trying to make php run in a post
- Pass PHP variable to JavaScript without inline JS
- Adding Default Settings to Theme My Login plugin
- How to add values to media “whitelist_options” in wp-admin/options.php template?
- WordPress Site Running Extremely Slow on Dedicated Server
- Where Does WordPress Make cURL Requests? How To Add cURL Option
- How to use an associative array in post__in with WP_Query?
- Can you run WordPress on a MarketLive/Java EE server?
- Customize Theme comment template to Insert VoteUp and VoteDown buttons
- filter default query to show just selected level of child pages in wordpress
- Store multiple custom field as post meta per post(css, js, html, 2 link) [closed]
- Set meta field to publish date + 2 weeks
- Redirect undesirable domain
- WordPress Gravatar filter is removing my custom attributes
- How to make my custom widget appear within WordPress widgets? Plugin development
- Refresh table data with Ajax
- Trying to install wordpress locally with mamp, but have unsupported php version
- Incorrect amount of posts returned when filtering related Woo products by custom taxonomy
- PHP code to use on next & previouspage links
- How to optimize the IF condition with many conditions and same output [closed]
- Show latest posts in a plain HTML website custom widget [closed]
- How to list posts from a plugin taxonomy?
- How to remove coupon dropdown feature
- Creating Database Table vs. Adding MetaData to Post & User
- How to put a form with php code into a variable or shortcode?
- WordPress redirect redirecting too many times or not at all
- how to prevent wordpress admin from logging in via woocommerce my-account page
- Add html link in functions.php files of the theme
- how can i add class or span tag at sprintf?
- How to change logo by category
- Need to Modify a WordPress Shortcode with another wordpress shortcode
- Problem with custom loop and wp_list_pluck [closed]
- Output only links using wp_nav_menu()
- How to add Post Tags to a new element in header.php?
- How can I get plugin meta data without knowing the plugin folder?
- Permalinks: site.com/post-tite vs site.com/post-id/post-title for SEO and Speed
- Plugin: Front-end Editor – User role specific editable content?
- Flatten Responses returned via WP REST API via WP_Error for obfuscation
- WordPress Custom Add To Cart Button with AJAX
- Custom reduce stock code affecting date_modified – How to bypass?
- Publish button now showing content after saving
- User filter posts by year
- Background image no longer fits to screen now that project is in php files
- Trying to call dynamic content into a 3rd party shortcode
- How to add a shortcode which runs a .php file for the current post
- How to Create Carousel Indicators in PHP Loop using wp_get_attachment_url function?
- Limit Search to Product Pages only unless I’m on Blogpage or Blogposts
- WP query posts BUT show the most recent and one per author
- Block error message in foreach loop when looping through ACF field
- WordPress wrong dates bug
- I have a background-image in css file but don’t show in site.how to fix this prblm. i sent screenshot. thx
- “Class Not Found” in HTML Form Target PHP File that contains the class
- shortcodes, custom php and their errors
- WooCommerce REST API AJAX Auth – 401 response
- In a foreach loop, how can I add a meta value if it doesn’t exist?
- Looping through and combining calls to Woocommerce REST API
- Should I use wp_cache in my plugin to make it faster?
- clicking on the_tags() generated tags to show all tagged posts page
- image on homepage disappeared due to change of permalink name
- 403 Forbidden WordPress Database Results
- Difference between “Walker_Nav_menu” and “walker”
- can’t grab PHP $_POST variable
- Loop 1 user randomly
- Wp_mail doesnt work
- Use WP_Query Data In Cookie
- Extend the WP_Customize_Image_Control class to change its non-frame $button_labels
- Sort by multiple options in custom field
- Is custom behaviour possible when asynchronously uploading?
- How can I show only if custom field has content [closed]
- Top menu disapears in Category Pages when filtering using ACF
- need help to arabic text in wordpress
- doubled content
- Adding if statement to content for homepage
- Tables not showing divs and loop/php items
- Keeping the previous get value and add another value when submitted
- Pagination not displaying
- How to add active class dynamically
- Setting WooCommerce currency programmatically
- Masking external links with internal link for member-only
- I’m not able to get access $wpdb in my php file in wordpress
- Submit cf7 form to cfdb as pdf/BLOB [closed]
- How can I change the URL via add_rewrite_rule()
- Variable ++ in query loop
- Generate and upload screenshot as featured image for user-submitted post
- How can precision be improved for the debug log timestamp?