Want to change the URL slug for Sydney’s Services, Employees, Testimonials, Projects, or Clients pages? Sydney Toolbox registers these custom post types with default slugs, but a short PHP filter lets you rewrite each one to match your brand or site structure.
In this guide, we’ll walk you through how to change the slugs for Sydney’s custom post types.
Before you get started, make sure you’ve installed and activated the Sydney theme along with the Sydney Toolbox plugin on your WordPress site. If you’re using features from Sydney Pro, ensure that both the Sydney theme and the Sydney Pro plugin are installed and active.
Changing a CPT Slug
Add the snippet below to your site. You can use a child theme or a code snippets plugin such as WPCode.
function sydney_change_clients_slug() {
return 'yournewslug';
}
add_filter('sydney_clients_rewrite_slug', 'sydney_change_clients_slug');
- Replace yournewslug with the slug you want to use.
- To change a different post type, replace clients with services, employees, testimonials, or projects in both the function name and the filter hook.
- Copy and adapt the function and filter for each post type slug you want to change.
- After saving the snippet, go to Settings >> Permalinks and click Save Changes to flush the rewrite rules.
That’s it! You’ve successfully changed the custom post type slugs in Sydney.
Next, would you like to adjust the hero area? Check out our guide on Decreasing the Slider Height in Sydney to learn more.
