|
/ Documentation /Frequently Asked Questions/ Customizing the Portal Slug Using a Filter

Customizing the Portal Slug Using a Filter

SureDash now supports a filter that allows developers to change the default portal slug (/portal/) to something more custom, like /community/. This gives site owners more flexibility when branding or organizing their URLs.

Note: This feature is available starting from the RC5 and above. Ensure you’re using the latest version of SureDash before applying this.

How to Change the Portal Slug

You can use the following code snippet in your theme’s functions.php file or insert it using a custom plugin:

add_filter( 'suredash_portal_slug', 'suredash_update_portal_slug' );

/**
* Change the SureDash portal slug.
*
* @param string $slug The existing slug.
* @return string The updated slug.
* @since 1.0.0
*/
function suredash_update_portal_slug( $slug ) {
return 'community'; // Change this to your desired slug.
}

Additional Steps Required

After adding this snippet:

  1. Flush the permalinks by visiting Settings > Permalinks in your WordPress dashboard and clicking Save Changes (you don’t need to make any changes, just hit save).
  2. Rebuild any SureDash blocks if you’re using them, so that they correctly reflect the updated URL structure.

You can now customize the SureDash portal slug using the suredash_portal_slug filter. Just add the provided snippet to your site and flush permalinks for the change to take effect. This offers a simple way to align the portal URL with your branding or site structure.

Was this doc helpful?
What went wrong?

We don't respond to the article feedback, we use it to improve our support content.

On this page
Scroll to Top