i need to make some blocks(widgets) like the same of WordPress dashboard widgets. that means if we dragged a widget to another position it wouldn't change after refreshing the page. is there any way for the same.?? i want some blocks or widgets (functioning like dashboard widgets) in my custom plugin. :)
Asked
Active
Viewed 200 times
0
-
Take a moment to familiarize yourself with the platform and how to ask questions. Tip: google "custom draggable widgets wordpress" – RST Jun 15 '20 at 11:00
1 Answers
0
I believe you need this:
function your_dashboard_widgets() {
global $wp_meta_boxes;
wp_add_dashboard_widget('custom_help_widget', 'Theme Support', 'your_widget_callback');
}
add_action('wp_dashboard_setup', 'your_dashboard_widgets');
function your_widget_callback() {
echo '<p>Welcome!</p>';
}

leitmotiv
- 51
- 4
-
Doing this will add the widgets to the admin dashboard area. Is it possible to add the widgets to a specific page in a plugin? – Mustafa Yusuf Jan 26 '23 at 20:53