When the given page is a child of Members Only, even if the
glm-members-only-template.php is not the selected template, then
apply the Member DB front styles.
$templateName = "glm-members-only-template.php";
$membersOnlyPage = get_option(GLM_MEMBERS_PLUGIN_OPTION_MEMBERS_ONLY_ID);
$newTemplate = locate_template( $templateName );
- if ( (is_in_tree($membersOnlyPage)) && ($newTemplate != "") ) { // if in same tree as the members page for this site
+ if ( is_in_tree( $membersOnlyPage ) ) { // if in same tree as the members page for this site
do_action('glmMembersFrontCSSFilter');
- return $newTemplate;
+ if ( $newTemplate != "" ) {
+ return $newTemplate;
+ }
/* //Uncomment this if you want every child page of the members only page to be given the members only template
* // (i.e. changed in the database) and not just using them on the front-end