llms_template_redirect()
Template Redirect
Contents
Return Return
(void)
Source Source
File: includes/llms.template.functions.php
function llms_template_redirect() { global $wp_query, $wp; // When default permalinks are enabled, redirect shop page to post type archive url. if ( ! empty( $_GET['page_id'] ) && get_option( 'permalink_structure' ) == '' && llms_get_page_id( 'shop' ) == $_GET['page_id'] ) { wp_safe_redirect( get_post_type_archive_link( 'course' ) ); exit; } // When default permalinks are enabled, redirect memberships page to post type archive url. if ( ! empty( $_GET['page_id'] ) && get_option( 'permalink_structure' ) == '' && llms_get_page_id( 'memberships' ) == $_GET['page_id'] ) { wp_safe_redirect( get_post_type_archive_link( 'llms_membership' ) ); exit; } }
Expand full source code Collapse full source code View on GitHub