startv

GmKeu

A Pen By Captain Anonymous

Pen Settings

CSS Base

Vendor Prefixing

Add External CSS

These stylesheets will be added in this order and before the code you write in the CSS editor. You can also add another Pen here, and it will pull the CSS from it. Try typing "font" or "ribbon" below.

Quick-add: + add another resource
via CSS Lint

Add External JavaScript

These scripts will run in this order and before the code in the JavaScript editor. You can also link to another Pen here, and it will run the JavaScript from it. Also try typing the name of any popular library.

Quick-add: + add another resource
via JS Hint

Code Indentation

     

Save Automatically?

If active, Pens will autosave every 30 seconds after being saved once.

Want a Run Button?

If active, the preview will update automatically when you change code.

HTML

            
              <?php
/**
 * The Header for our theme
 *
 * Displays all of the <head> section and everything up till <div id="main">
 *
 * @package WordPress
 * @subpackage Test File
 * @since Test 1.0
 */
?>
<!DOCTYPE html>
<!--[if IE 7]>
<html class="ie ie7" <?php language_attributes(); ?>>
<![endif]-->
<!--[if IE 8]>
<html class="ie ie8" <?php language_attributes(); ?>>
<![endif]-->
<!--[if !(IE 7) | !(IE 8) ]><!-->
<html <?php language_attributes(); ?>>
<!--<![endif]-->
<head>
<meta charset="<?php bloginfo( 'charset' ); ?>">
<meta name="viewport" content="width=device-width">
<title>
<?php wp_title( '|', true, 'right' ); ?>
</title>
<link rel="profile" href="http://gmpg.org/xfn/11">
<link rel="pingback" href="<?php bloginfo( 'pingback_url' ); ?>">
<link href='http://fonts.googleapis.com/css?family=Adamina|Raleway:600' rel='stylesheet' type='text/css'>
<!--[if lt IE 9]>
	<script src="<?php echo get_template_directory_uri(); ?>/js/html5.js"></script>
	<![endif]-->
<?php wp_head(); ?>
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.1/jquery.min.js"></script>
<script type="text/javascript">
	      // Portions of this were adapted from "http://www.i-marco.nl/weblog/jquery-accordion-menu/".
    // It only went one level deep.
    // This now accounts for more levels of accordion.
     
    jQuery(document).ready( function(jQuery) {
     
    // This hides all the sub menus on page load
    jQuery('#nav-main ul.sub-menu').hide();
    // This makes sure that all the sub menus are open when applicable
    jQuery('#nav-main li.current-menu-item').children().show();
    // This keeps the nav open to the item that you are navigating to.
    jQuery('#nav-main li.current-menu-item').parents().show();
     
    jQuery('#nav-main ul li a').click(
    function(evt) {
	evt.preventDefault();
    var checkElement = jQuery(this).next();
    if((checkElement.is('ul')) && (checkElement.is(':visible'))) {
    return false;
    }
    if((checkElement.is('ul')) && (!checkElement.is(':visible'))) {
    jQuery(this).parent().siblings("li:has(ul)").find("ul").slideUp('normal');
    jQuery('#nav-main ul ul li ul:visible').slideUp('normal');
    checkElement.slideDown('normal');
    return false;
    }
    }
    );
    jQuery('#nav-main ul ul li a').click(
    function() {
    var checkElement = jQuery(this).next();
    if((checkElement.is('ul')) && (checkElement.is(':visible'))) {
    return false;
    }
    if((checkElement.is('ul')) && (!checkElement.is(':visible'))) {
    jQuery('#nav-main ul ul').slideUp('normal');
    jQuery('#nav-main ul ul li ul:visible').slideUp('normal');
    checkElement.slideDown('normal');
    return false;
    }
    }
    );
     
    });
	</script>
<script type="text/javascript">
    jQuery(document).ready(function(){
    jQuery.ajaxSetup({cache:false});
    jQuery(".btn-slide").click(function(){
		var post_id = jQuery(this).attr("rel")
        jQuery("#page-con").html("loading...");
        jQuery("#page-con").load("/~swstr0/swsg-ajax/",{id:post_id});
		jQuery("#panel").slideToggle("slow");
		jQuery(this).toggleClass("active");
		return false;
    });
});
</script>
</head>

<body <?php body_class(); ?>>
<div id="panel">
  <div id="page-con"></div>
</div>
<div id="page" class="hfeed site">
<header id="masthead" class="site-header" role="banner">
  <div class="header-main">
    <h1 class="site-title"></h1>
  </div>
</header>
<!-- #masthead -->

<div id="main" class="site-main">
<nav id="nav-main" role="navigation"> <a class="screen-reader-text skip-link" href="#content">
  <?php _e( 'Skip to content', 'twentyfourteen' ); ?>
  </a>
  <?php wp_nav_menu( array( 'theme_location' => 'primary', 'menu_class' => 'nav-menu' ) ); ?>
</nav>
            
          
!

CSS

            
              
            
          
!

JS

            
              <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.1/jquery.min.js"></script>
<script type="text/javascript">
	      // Portions of this were adapted from "http://www.i-marco.nl/weblog/jquery-accordion-menu/".
    // It only went one level deep.
    // This now accounts for more levels of accordion.
     
    jQuery(document).ready( function(jQuery) {
     
    // This hides all the sub menus on page load
    jQuery('#nav-main ul.sub-menu').hide();
    // This makes sure that all the sub menus are open when applicable
    jQuery('#nav-main li.current-menu-item').children().show();
    // This keeps the nav open to the item that you are navigating to.
    jQuery('#nav-main li.current-menu-item').parents().show();
     
    jQuery('#nav-main ul li a').click(
    function(evt) {
	evt.preventDefault();
    var checkElement = jQuery(this).next();
    if((checkElement.is('ul')) && (checkElement.is(':visible'))) {
    return false;
    }
    if((checkElement.is('ul')) && (!checkElement.is(':visible'))) {
    jQuery(this).parent().siblings("li:has(ul)").find("ul").slideUp('normal');
    jQuery('#nav-main ul ul li ul:visible').slideUp('normal');
    checkElement.slideDown('normal');
    return false;
    }
    }
    );
    jQuery('#nav-main ul ul li a').click(
    function() {
    var checkElement = jQuery(this).next();
    if((checkElement.is('ul')) && (checkElement.is(':visible'))) {
    return false;
    }
    if((checkElement.is('ul')) && (!checkElement.is(':visible'))) {
    jQuery('#nav-main ul ul').slideUp('normal');
    jQuery('#nav-main ul ul li ul:visible').slideUp('normal');
    checkElement.slideDown('normal');
    return false;
    }
    }
    );
     
    });
	</script>
<script type="text/javascript">
    jQuery(document).ready(function(){
    jQuery.ajaxSetup({cache:false});
    jQuery(".btn-slide").click(function(){
		var post_id = jQuery(this).attr("rel")
        jQuery("#page-con").html("loading...");
        jQuery("#page-con").load("/~swstr0/swsg-ajax/",{id:post_id});
		jQuery("#panel").slideToggle("slow");
		jQuery(this).toggleClass("active");
		return false;
    });
});
</script>
            
          
!
999px
Loading ..................

Console