conditional load of template header
-
I want to conditional load the member-header.php
In members -> single -> header.phpI want to customise the below code based on the profile/ xprofile field selected during registration
<?php locate_template( array( ‘members/single/member-header.php’ ), true ); ?>
To
1) if profile field is player then load template “player-header.php
<?php locate_template( array( ‘members/single/player-header.php’ ), true ); ?>Else
2) load either default or load team-header.php
<?php locate_template( array( ‘members/single/team-header.php’ ), true ); ?>I have created both templates in that directory.
But how to customize the main code to load those templates conditionaly.
- The topic ‘conditional load of template header’ is closed to new replies.