Im trying to delete the section WordPress News in my dashboard by creating a simple plugin. First of all, i’ve made a php file in the following directory:


In the basic-plugin.php file i have the following block of code:

Plugin Name: Basic Plugin
Plugin URI:
Description: My first plugin for creating and displaying job opportunities
Author: Rumen Panchev
Version: 1.0
License: GPLv2

function ru_remove_dashboard_widget() {
    remove_meta_box( 'dashboard_primary', 'dashboard', 'post_container_1' );
add_action( 'wp_dashboard_setup', 'ru_remove_dashboard_widget' );

The problem is that the section is still in the dashboard. Im new in WordPress Development and not sure why is this happening ?

Read more here: Why remove_meta_box() function is not working in my plugin?


If you know the solution of this issue, please leave us a reply in Comment section, to update the question.

Wordpress related questions and answers: