Skip to content

Instantly share code, notes, and snippets.

@SeanChDavis
Created January 18, 2015 02:52
Show Gist options
  • Save SeanChDavis/491d6eb5879ddff4ae48 to your computer and use it in GitHub Desktop.
Save SeanChDavis/491d6eb5879ddff4ae48 to your computer and use it in GitHub Desktop.
<?php
/**
* The Sidebar containing the main widget areas.
*
* @package SimpleMag
* @since SimpleMag 1.4
**/
global $ti_option;
?>
<aside class="sidebar<?php if ( $ti_option['site_sidebar_behaviour'] == 1 ) { echo ' sidebar-mobile'; } ?>" role="complementary">
<div id="search-2" class="widget widget_search">
<h3>SEARCH</h3>
<form method="get" id="searchform" action="http://curlsunderstood.com/" role="search">
<input type="text" name="s" id="s" value="NEW TEXT" onfocus="if(this.value=='NEW TEXT')this.value='';" onblur="if(this.value=='')this.value='NEW TEXT';" />
<button type="submit">
<i class="icon-search"></i>
</button>
</form>
</div>
<?php
if ( is_page() && !is_page_template( 'page-composer.php' )) { // Output sidebar for pages besides homepage
if ( !function_exists('dynamic_sidebar') || !dynamic_sidebar( 'Pages ') ) {
dynamic_sidebar( 'Pages' );
}
} else { // Output sidebar for categories and posts
if ( !function_exists('dynamic_sidebar') || !dynamic_sidebar( 'Magazine' ) ) {
dynamic_sidebar( 'Magazine' );
}
}
?>
</aside><!-- .sidebar -->
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment