Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

I am trying to create a dashboard in post section of wordpress admin area. I want it just underneath the Publish dashboard.

like for example this code here place a dashboard in immediately when I log into the admin area.

// Create the function to output the contents of our Dashboard Widget

function example_dashboard_widget_function() {
    // Display whatever it is you want to show
    echo "Hello World, I'm a great Dashboard Widget";
} 

// Create the function use in the action hook

function example_add_dashboard_widgets() {
    wp_add_dashboard_widget('example_dashboard_widget', 'Example Dashboard Widget', 'example_dashboard_widget_function');   
} 

// Hook into the 'wp_dashboard_setup' action to register our other functions

add_action('wp_dashboard_setup', 'example_add_dashboard_widgets' );
share|improve this question
    
Looks like you are confusing some terms. First you need to know what is Dashboard, a Dashboard Widget and a Meta Box. As mrwweb says, take a look at the Codex. And I suspect that you may be referring to Custom Meta Boxes, no? –  brasofilo May 17 '12 at 15:57
add comment

1 Answer

up vote 1 down vote accepted

You'll want to look into the add_menu_page() function and then use the $position parameter to place it in the menu where you want it.

share|improve this answer
    
Hey mrwweb, thanks for your answer... can you reference my code above so that I can understand. thank. –  Ronny May 17 '12 at 14:16
1  
That code is for adding a dashboard widget to the existing Dashboard ( Codex Reference ). You'll need to start with the $function parameter for add_menu_page() which gives you the callback for outputting your new page's content. It's all there in the Codex, you just have to start reading. –  mrwweb May 17 '12 at 14:59
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.