• <?php if ( is_page('Get a Quote') ) { ?>
    <?php include(TEMPLATEPATH.'/sb-quote.php');?>
    <?php } else { ?>
    <?php } ?>

    The code above is almost perfect. I just need more options. I have 6 pages that use this 1 template and each of them use their own sidebar file. I’m a designer, not a programmer. I’m not sure how to extend this to add more options.

    Any help that doesn’t include a plug-in link would be greatly appreciated. Thanks for your time.

Viewing 3 replies - 1 through 3 (of 3 total)
  • Thread Starter Nate

    (@kapitol)

    I appreciate the link to the php if else statement, alchymyth. However I’ve read it. I did Google this before I posted and every solution listed seemed to address a different question based on a different condition.

    Many pages to get 1 template:

    <?php
    
    if ( is_page('Get A Quote') || is_page('Another Page') || is_page(contact) ) { include(TEMPLATEPATH.'/sb-quote.php'); }
    
    else { }
    
    ?>

    Many pages to get different templates:

    <?php 
    
    if ( is_page('Get a Quote') ) { include(TEMPLATEPATH.'/sb-quote.php');
    if ( is_page('Another Page') ) { include(TEMPLATEPATH.'/another-page.php');
    if ( is_page('And another') ) { include(TEMPLATEPATH.'/and-another');
    
    } else {  } 
    
    ?>
Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Dynamic Sidebar checked by Page’ is closed to new replies.