Custom dashboard widgets displaying inside other widgets (1 post)

  1. aaronats
    Posted 7 years ago #

    I have two custom dashboard widgets hooking into the wp_dashboard_setup from two different plugins using wp_add_dashboard_widget. Activating the plugins one at a time renders the widgets in their own meta box, but activating both places one inside the other. Any ideas?

    Plugin #1

    function loan_widget() {
    	wp_add_dashboard_widget('loan_dashboard_widget', 'Active Loans', 'get_active_loans');
    add_action('wp_dashboard_setup', 'loan_widget' );

    Plugin #2

    function affiliate_widget() {
    	wp_add_dashboard_widget('affiliate_dashboard_widget', 'Affiliates', 'affiliate_short_list');
    add_action('wp_dashboard_setup', 'affiliate_widget' );

Topic Closed

This topic has been closed to new replies.

About this Topic