Last active
July 7, 2018 02:57
-
-
Save cliffordp/75d45b7508b881abdf0b60d3aa677ecf to your computer and use it in GitHub Desktop.
Redirect The Events Calendar: Community Events' login form to custom WordPress login form page (prior to CE version 4.4.7)
This file contains hidden or 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 | |
| /** | |
| * From https://gist.github.com/cliffordp/75d45b7508b881abdf0b60d3aa677ecf | |
| * | |
| * Redirect The Events Calendar: Community Events' login form to custom WordPress login form. | |
| * | |
| * If using Community Events version 4.4.7 (June 1, 2017) or later, use https://gist.github.com/cliffordp/c78a2ca22a6f231abb5754540a5f86f4 instead | |
| * | |
| * @link https://developer.wordpress.org/reference/functions/wp_redirect/ | |
| * | |
| */ | |
| add_action( 'tribe_ce_event_submission_login_form', 'cliff_custom_login_url' ); | |
| add_action( 'tribe_ce_event_list_login_form', 'cliff_custom_login_url' ); | |
| function cliff_custom_login_url() { | |
| wp_redirect( '/some/page/' ); // enter your full URL -- e.g. with https:// -- or a relative path here | |
| exit(); | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment