- Installing SureDash
- Download and Access Your SureDash License
- Updating SureDash
- Understanding Spaces and Space Groups in SureDash
- Add a Space Content Type in SureDash
- How to Set Up a SureDash Course Space
- How to Set Up Google Login in SureDash: A Step-by-Step Guide
- How to Set Up Facebook Login in SureDash: A Step-by-Step Guide
- Understanding the Customize Portal in SureDash
- How To Add a Logo To The SureDash Portal
- Setting up Space Groups
- Hidden Spaces in SureDash
- How to Create a Feed Space
- How to Set up “Course” space in SureDash?
- How to Create a “Discussion” Space in SureDash
- How To Set Up A Private Discussion Space In SureDash
- Creating a “Single Post/Page” Space in SureDash
- How to Set Up a “Link” Space in SureDash
- How to Configure SureDash Space Layouts
- Understanding the “Single Post/Page” Space Type in SureDash
- How to Regenerate the Default SureDash Pages
- Recommended Hosting for SureDash
- Customizing the Portal Slug Using a Filter
- How to Edit SureDash Space or Post with Any Page Builder
- How to Use the Profile URLs in SureDash
- How to Manage Navigation Sidebar Top Sticky Offset in SureDash
- Custom Classes Used in Site Editor and Their Purpose
- How to Reset the Portal Template in SureDash?
- Media Handling in the Resource Library
- Location Where Users Can View Their Accessed Resources in SureDash
How to Create Custom Extensions and Add Custom Options in SureDash
This guide walks you through the process of building a custom SureDash extension and integrating your own options into the SureDash Settings and Meta Sidebar.
1. Overview
SureDash provides hooks and filters that make it easy to extend its functionality without modifying the core plugin. By creating a custom extension, you can add new settings, enhance the dashboard, and control space-level metadata.
2. Prerequisites
Before you start, make sure you have:
- A basic understanding of WordPress plugin development.
- Access to the SureDash plugin is installed and activated.
- The sample addon plugin provided here: Download Addon Plugin
- Demo walkthrough video: Watch Here
3. Creating a Custom SureDash Extension
- Download and Extract the Addon
Use the addon plugin zip file as a starting point. - Install and Activate the Plugin
- Go to Plugins > Add New.
- Upload the suredash-addon.zip.
- Click Activate once installed.
Understand the Plugin Structure
The main plugin file is: suredash-addon.php
- This is where you’ll register hooks and filters to add your custom functionality.
4. Adding Custom Options in SureDash Settings
SureDash exposes the filter suredashboard_settings_dataset to manage custom settings.
This filter allows you to define default values, data types, and custom fields.
Example Code
add_filter( 'suredashboard_settings_dataset', function( $settings ) {
// Add a new custom setting
$settings['my_custom_option'] = array(
'type' => 'string', // Data type
'default' => '', // Default value
'label' => __( 'My Custom Option', 'suredash-addon' ),
);
return $settings;
});
Explanation
- type: Defines the data type (e.g., string, boolean, integer).
- default: Sets the initial value.
- label: The title that appears in the settings UI.
5. Adding Custom Options in the Meta Sidebar
For space-level metadata, SureDash provides the suredashboard_post_meta_dataset filter.
This lets you add custom options to the Meta Sidebar within spaces.
Example Code
add_filter( 'suredashboard_post_meta_dataset', function( $meta ) {
// Add a new meta field at the space level
$meta['custom_meta_field'] = array(
'type' => 'boolean',
'default' => false,
'label' => __( 'Enable Custom Meta Option', 'suredash-addon' ),
);
return $meta;
});
Explanation
- custom_meta_field: Unique key for your meta option.
- type: Supported types include string, boolean, integer, etc.
- default: The initial state of the option.
- label: The name that will appear in the sidebar.
6. Reviewing Your Plugin
Once your custom extension is ready:
- Install and Activate: Make sure your addon is installed and active.
- Follow the Development Workflow: Check the EXTENSIBILITY_GUIDE.md file in the SureDash plugin for detailed steps.
- Watch the Demo Video: Go through the demo video to see the development process in action.
7. Resources
- Addon Plugin: Download Here
- Demo Video: Watch Here
- SureDash Documentation: Link here.
- Extensibility Guide: Included in the SureDash plugin as EXTENSIBILITY_GUIDE.md
8. Summary
With SureDash’s extensibility hooks, you can:
- Create custom extensions without touching core files.
- Add custom options in the Settings Panel.
- Extend the Meta Sidebar at the space level.
- Follow the provided demo and guide for a smooth development experience.
We don't respond to the article feedback, we use it to improve our support content.