Dashboard Widgets Suite Shortcodes

Below, you’ll find a detailed guide on how to add the Dashboard Widgets Suite Shortcodes to your WordPress website, including their parameters, examples, and PHP function code. Additionally, we’ll assist you with common issues that might cause the Dashboard Widgets Suite Plugin shortcodes not to show or not to work correctly.

Before starting, here is an overview of the Dashboard Widgets Suite Plugin and the shortcodes it provides:

Plugin Icon
Dashboard Widgets Suite

"Dashboard Widgets Suite is a versatile WordPress plugin designed to enhance your admin dashboard with a suite of powerful, easy-to-use, and customizable widgets. Perfect for site management."

★★★★☆ (34) Active Installs: 5000+ Tested with: 6.3.2 PHP Version: 5.6.20
Included Shortcodes:
  • [dws_feed_box]
  • [dws_social_box]
  • [dws_user_notes]

Dashboard Widgets Suite [dws_feed_box] Shortcode

The ‘dashboard-widgets-suite’ plugin shortcode is designed to display a feed box on the frontend of your WordPress site. This shortcode checks if the feed box widget is enabled and the user role has the necessary permissions. It then fetches and displays the feed box content. The output can be further customized using filters and actions.

Shortcode: [dws_feed_box]

Examples and Usage

Basic example – Display the feed box on the frontend using the shortcode.

[dws_feed_box]

PHP Function Code

In case you have difficulties debugging what causing issues with [dws_feed_box] shortcode, check below the related PHP functions code.

Shortcode line:

add_shortcode('dws_feed_box',    'dashboard_widgets_suite_feed_box_frontend');

Shortcode PHP function:

function dashboard_widgets_suite_feed_box_frontend() {
	
	global $dws_options_feed_box;
	
	$feed_box = '';
	
	if (isset($dws_options_feed_box['widget_feed_box_front']) && $dws_options_feed_box['widget_feed_box_front']) {
		
		$display_feed_box = isset($dws_options_feed_box['widget_feed_box_view']) ? $dws_options_feed_box['widget_feed_box_view'] : null;
		
		if (dashboard_widgets_suite_check_role($display_feed_box)) {
			
			require_once DWS_DIR .'widgets/widget-feed-box.php';
			
			$feed_box = dashboard_widgets_suite_feed_box_content();
			
		}
		
	}
	
	$feed_box = apply_filters('dashboard_widgets_suite_feed_box_frontend_data', $feed_box);
	
	do_action('dashboard_widgets_suite_feed_box_frontend', $feed_box);
	
	return $feed_box;
		
}

Code file location:

dashboard-widgets-suite/dashboard-widgets-suite/dashboard-widgets.php

Dashboard Widgets Suite [dws_social_box] Shortcode

The Dashboard Widgets Suite shortcode is a powerful tool that displays a social box on the front-end of your WordPress site. This shortcode fetches the ‘widget_social_box_front’ option from the ‘dws_options_social_box’ global variable. If the option is enabled, it checks the user role permissions. If the user has the right permissions, the social box content is fetched from ‘widget-social-box.php’ file. The ‘dashboard_widgets_suite_social_box_frontend_data’ filter is applied to the social box content, and the ‘dashboard_widgets_suite_social_box_frontend’ action is executed. The social box content is then returned.

Shortcode: [dws_social_box]

Examples and Usage

Basic example – A straightforward usage of the shortcode to display the social box widget on the frontend.

[dws_social_box /]

PHP Function Code

In case you have difficulties debugging what causing issues with [dws_social_box] shortcode, check below the related PHP functions code.

Shortcode line:

add_shortcode('dws_social_box',  'dashboard_widgets_suite_social_box_frontend');

Shortcode PHP function:

function dashboard_widgets_suite_social_box_frontend() {
	
	global $dws_options_social_box;
	
	$social_box = '';
	
	if (isset($dws_options_social_box['widget_social_box_front']) && $dws_options_social_box['widget_social_box_front']) {
		
		$display_social_box = isset($dws_options_social_box['widget_social_box_view']) ? $dws_options_social_box['widget_social_box_view'] : null;
		
		if (dashboard_widgets_suite_check_role($display_social_box)) {
			
			require_once DWS_DIR .'widgets/widget-social-box.php';
			
			$social_box = dashboard_widgets_suite_social_box_content();
			
		}
		
	}
	
	$social_box = apply_filters('dashboard_widgets_suite_social_box_frontend_data', $social_box);
	
	do_action('dashboard_widgets_suite_social_box_frontend', $social_box);
	
	return $social_box;
	
}

Code file location:

dashboard-widgets-suite/dashboard-widgets-suite/dashboard-widgets.php

Dashboard Widgets Suite [dws_user_notes] Shortcode

The Dashboard Widgets Suite shortcode is designed to display user notes on the frontend. This shortcode fetches user notes from the ‘widget_user_notes_front’ option. If the option is enabled, it requires the ‘widget-notes-user.php’ file and appends its content to the ‘user_notes’ string. The ‘user_notes’ string is then modified by any filters attached to ‘dashboard_widgets_suite_notes_user_frontend_data’ and is finally returned for display.

Shortcode: [dws_user_notes]

Examples and Usage

Basic example – The following shortcode is used to display user notes on the frontend using the Dashboard Widgets Suite plugin.

[dws_user_notes]

PHP Function Code

In case you have difficulties debugging what causing issues with [dws_user_notes] shortcode, check below the related PHP functions code.

Shortcode line:

add_shortcode('dws_user_notes',  'dashboard_widgets_suite_user_notes_frontend');

Shortcode PHP function:

function dashboard_widgets_suite_user_notes_frontend() {
	
	global $dws_options_notes_user;
	
	$user_notes = '';
	
	if (isset($dws_options_notes_user['widget_user_notes_front']) && $dws_options_notes_user['widget_user_notes_front']) {
		
		require_once DWS_DIR .'widgets/widget-notes-user.php';
		
		$user_notes .= dashboard_widgets_suite_notes_user_content();
		
	}
	
	$user_notes = apply_filters('dashboard_widgets_suite_notes_user_frontend_data', $user_notes);
	
	do_action('dashboard_widgets_suite_notes_user_frontend', $user_notes);
	
	return $user_notes;
	
}

Code file location:

dashboard-widgets-suite/dashboard-widgets-suite/dashboard-widgets.php

Conclusion

Now that you’ve learned how to embed the Dashboard Widgets Suite Plugin shortcodes, understood the parameters, and seen code examples, it’s easy to use and debug any issue that might cause it to ‘not work’. If you still have difficulties with it, don’t hesitate to leave a comment below.

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *