factmaven / disable-blogging

Turn WordPress into a non-blogging CMS platform. Disable Blogging is a plugin that disables all blog related functionalities (posts, comments, feeds, etc.) on the front-end and back-end. This results in a cleaner and simpler WordPress platform to be used for static websites.
https://wordpress.org/plugins/disable-blogging/
37 stars 8 forks source link

Prevents Elementor from loading #25

Open nisbet-hubbard opened 3 months ago

nisbet-hubbard commented 3 months ago

Just to report that this useful plugin conflicts with more recent versions of Elementor, although I suppose it’s no longer maintained?

nisbet-hubbard commented 3 months ago

For those who can’t use the plugin because of this issue, and whose needs are mainly cosmetic, the following functions.php snippet serves the same purpose:

function remove_admin_bar ( $wp_admin_bar ) {
    $wp_admin_bar->remove_node( 'comments' );    
}
add_action( 'admin_bar_menu', 'remove_admin_bar', 999 );

function remove_menus (){
  remove_menu_page( 'edit.php' );                   //Posts
  remove_menu_page( 'edit-comments.php' );          //Comments 
}
add_action( 'admin_menu', 'remove_menus', 999 );