Skip to content

Instantly share code, notes, and snippets.

@hivepress
Created April 26, 2022 18:16
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save hivepress/42a92aeef886849e4371c5df16bedfbd to your computer and use it in GitHub Desktop.
Save hivepress/42a92aeef886849e4371c5df16bedfbd to your computer and use it in GitHub Desktop.
Change the request URL slug (requires refreshing permalinks) #hivepress #requests
<?php
add_filter(
'hivepress/v1/post_types',
function( $args ) {
if ( isset( $args['request'] ) ) {
$args['request']['rewrite']['slug'] = 'custom-slug-here';
}
return $args;
},
100
);
@obey24com
Copy link

Could you also provide a snippet for „submit-request“ slug?

@hivepress
Copy link
Author

Please try using this one, but with the "request_submit_page" array key instead https://gist.github.com/hivepress/e8dab6350a6f075f771334c3256b563c

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment