Skip to:
Content
Pages
Categories
Search
Top
Bottom

conditional load of template header


  • sammjv
    Participant

    @sammjv

    I want to conditional load the member-header.php
    In members -> single -> header.php

    I 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.

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘conditional load of template header’ is closed to new replies.
Skip to toolbar