Permalink
Browse files

Added an about page sidebar

  • Loading branch information...
1 parent ac721dd commit 275278c5f326a62c13b52d1968147185192c499b @eyeseast eyeseast committed May 25, 2011
Showing with 39 additions and 1 deletion.
  1. +1 −1 about.php
  2. +2 −0 functions.php
  3. +14 −0 includes/sidebars.php
  4. +22 −0 sidebar-about.php
View
@@ -113,7 +113,7 @@
</article><!-- / #content .grid8 -->
<aside id="sidebar" class="grid_4">
-<?php get_sidebar(); ?>
+<?php get_sidebar( 'about' ); ?>
</aside>
<!-- /.grid_4 -->
<?php get_footer(); ?>
View
@@ -1,5 +1,7 @@
<?php
// includes
require_once( 'includes/users.php' );
+require_once( 'includes/sidebars.php' );
require_once( 'includes/stations.php' );
+
?>
View
@@ -0,0 +1,14 @@
+<?php
+
+add_action( 'init', 'sw_register_sidebars' );
+function sw_register_sidebars() {
+
+ // sidebar-about.php
+ register_sidebar( array(
+ 'id' => 'about',
+ 'name' => 'About Page Sidebar',
+ 'description' => 'A special sidebar for the about page'
+ ) );
+}
+
+?>
View
@@ -0,0 +1,22 @@
+<?php
+/**
+ * about page sidebar
+ */
+?>
+
+<div id="category-sidebar" class="widget-area" role="complementary">
+<ul class="widget-list">
+
+<?php
+ /* When we call the dynamic_sidebar() function, it'll spit out
+ * the widgets for that widget area. If it instead returns false,
+ * then the sidebar simply doesn't exist, so we'll hard-code in
+ * some default sidebar stuff just in case.
+ */
+ if ( ! dynamic_sidebar( 'about' ) ) : ?>
+
+ <!-- show if sidebar is empty -->
+
+<?php endif; // end primary widget area ?>
+ </ul>
+ </div><!-- #primary .widget-area -->

0 comments on commit 275278c

Please sign in to comment.