Pastebin launched a little side project called VERYVIRAL.com, check it out ;-) Want more features on Pastebin? Sign Up, it's FREE!
Guest

SWc header

By: alchymyth on Jan 23rd, 2013  |  syntax: PHP  |  size: 3.71 KB  |  views: 6  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. <?php
  2. /*
  3. Package: Simply Works Core
  4. Title: Simply Works Core
  5. Update: 04/10/12
  6. Author: Jason Huber
  7. Version: 1.5.8
  8. Description: Header include file
  9.  */
  10. ?>
  11. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  12. <html xmlns="http://www.w3.org/1999/xhtml" <?php language_attributes(); ?>>
  13. <head>
  14. <meta http-equiv="Content-Type" content="<?php bloginfo('html_type'); ?>; charset=<?php bloginfo('charset'); ?>" />
  15. <title><?php if (is_home()) { esc_attr(bloginfo('name') ); } elseif (is_category() || is_tag()) { single_cat_title(); echo ' • ' ; esc_attr(bloginfo('name')); } elseif (is_single() || is_page()) { single_post_title(); } else { wp_title('',true); } ?></title>
  16. <link rel="stylesheet" href="<?php esc_url(bloginfo( 'stylesheet_url' )); ?>" type="text/css" media="screen" />
  17. <link rel="pingback" href="<?php bloginfo('pingback_url'); ?>" />
  18. <link rel="shortcut icon" href="<?php esc_url(bloginfo('stylesheet_directory')); ?>/favicon.ico" />
  19. <?php if ( is_singular() ) wp_enqueue_script('comment-reply'); ?>
  20. <?php // Retrieve Simply Works Theme Options Data
  21. global $swc_options;
  22. $swc_options = get_option('swc_theme_options');
  23. if ( isset ($swc_options['swc_sidebar']) &&  ($swc_options['swc_sidebar'] == "1") ) { echo "<style type=\"text/css\">#contentarea {float: right; border: 0;}</style>";}
  24. if ( isset ($swc_options['swc_stylesheet']) &&  ($swc_options['swc_stylesheet'] != "default") ) {?>
  25. <?php echo wp_enqueue_style("swc_skin", get_template_directory_uri()."/skins/".$swc_options['swc_stylesheet'].".css", false, '1.0', "screen"); ?>
  26. <?php } ?>
  27. <?php wp_head(); ?>
  28. </head>
  29. <body <?php body_class(); ?>>
  30. <div id="webpage"><!-- START webpage ID -->
  31.   <div id="header"><!-- START header ID -->
  32.    <div class="wrapper" <?php
  33.     $is_header_image = get_header_image();
  34.         /// Check to see if the user added a custom image
  35.    if($is_header_image == NULL) {echo "style=\"height: auto\" ";} ?>><!-- START  wrapper CLASS -->
  36.      <div id="headerleft"><!-- Logo area -->
  37. <?php if ( isset ($swc_options['swc_logo']) &&  (trim($swc_options['swc_logo'])!="") ) {
  38. ?>
  39.  <div class="logo" <?php // add a little space around the logo WITHOUT a custom header image
  40.    if($is_header_image != NULL) {echo "style=\"padding: 30px 0 0 0;\" ";} ?>><a href="<?php echo home_url(); ?>"><img src="<?php echo esc_attr(strip_tags($swc_options['swc_logo'])); ?>"  alt="<?php esc_attr(strip_tags(bloginfo('name'))); ?>" /></a></div>
  41.  <?php } else { ?>
  42.      <h1><a href="<?php echo home_url(); ?>"> <?php esc_attr(strip_tags(bloginfo('name'))); ?> </a></h1> <span><?php esc_attr(strip_tags(bloginfo('description'))); ?></span>
  43.      <?php } ?>
  44.    </div> <!-- End  logo area -->
  45. <div id="headerright"><!-- START header right ID-->
  46.         <?php // Widget area for user to place image or ad code using Appearence > Widget > Text
  47.           if (is_active_sidebar('header-ad')) : ?>
  48.               <?php dynamic_sidebar('header-ad'); ?>
  49.       <?php endif; ?>
  50.    </div> <!-- END  header right ID-->
  51.   <div class="clear"></div>
  52.  </div> <!-- END  wrapper CLASS -->
  53. </div> <!-- END  header ID -->
  54. <?php // Menus only show if user create a menu in Appearence > Menu
  55. if ( function_exists( 'register_nav_menu' ) ) {
  56.         if ( has_nav_menu( 'primary-menu' ) ) { ?>
  57.         <div id="navbar">
  58.        <div class="wrapper">
  59.                  <?php wp_nav_menu( array( 'theme_location' => 'primary-menu', 'fallback_cb' => '') ); ?>
  60.        </div>
  61.         </div>
  62.     <div class="clear"></div>
  63. <?php
  64.    }
  65.         if ( has_nav_menu( 'secondary-menu' ) ) { ?>
  66.         <div id="subnav">
  67.        <div class="wrapper">
  68.                 <?php wp_nav_menu( array( 'theme_location' => 'secondary-menu', 'fallback_cb' => '') ); ?>
  69.        </div>
  70.         </div>
  71.     <div class="clear"></div>
  72. <?php
  73.   }
  74. }
  75. ?>