Created
January 30, 2019 19:54
-
-
Save altoin/3157b332488a754988bd134b0dbd535c to your computer and use it in GitHub Desktop.
Change default entry ID to your custom slug
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
add_filter('gravityview_entry_slug', 'change_the_gravityview_entry_slug'); | |
/** | |
* Change the /123/ URL piece to /myslug/ | |
* @param string $slug Previous slug, default: "entryId" | |
* @return string Change the new endpoint to "myslug" | |
*/ | |
function change_the_gravityview_entry_slug( $slug ) { | |
return 'myslug'; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment