WordPress.org

Forums

Add a custom dashboard widget to Posts / "Add New" ?? (3 posts)

  1. Rajkurt
    Member
    Posted 3 years ago #

    Hi everyone,

    Im trying to install a custom dashboard widget in my admin panel. In the "funtctions.php" file I have added this test code:

    // example custom dashboard widget
    function custom_dashboard_widget() {
    	echo "<p>Dearest Client, Here&rsquo;s how to do that thing I told you about yesterday...</p>";
    }
    function add_custom_dashboard_widget() {
    	wp_add_dashboard_widget('custom_dashboard_widget', 'How to Do Something in WordPress', 'custom_dashboard_widget');
    }
    add_action('wp_dashboard_setup', 'add_custom_dashboard_widget');

    It works perfect and the plugin shows under "Home" in the dashboard, but the problem is that I want this widget to show in under "Posts" / "Add-New" page in the dashboard among the other standard widgets (Categories, Tags, etc).

    How can I manage to do that?

    Thanks in advance!

  2. Chouby
    Member
    Posted 3 years ago #

    Maybe the function add_meta_box used together with the action add_meta_boxes will help you.

  3. Rajkurt
    Member
    Posted 3 years ago #

    Thanks for the reply, I have already solved it through with the help of this link . I put this in the functions.php.

Topic Closed

This topic has been closed to new replies.

About this Topic