×

Welcome to TagMyCode

Please login or create account to add a snippet.
0
0
 
0
Language: Javascript
Posted by: Rick Clark
Added: Aug 10, 2012 11:37 PM
Modified: Aug 10, 2012 11:38 PM
Views: 24
Tags: no tags
Script to call up different sidebars for different pages
  1. <?php
  2. if( is_home() || is_front_page() )
  3. {
  4. // no sidebar
  5. }
  6.  elseif ( is_page( 'Contact Us' ) )
  7. {
  8. get_sidebar( 'contact' );
  9. }
  10.  elseif ( is_page() )
  11. {
  12. get_sidebar( 'secondary' );
  13. }
  14.  ?>