Restored custom_slug functionality, fixes #2761

This change is to ensure the functionality only works when it is turned on