sidebar.php

Description: The default sidebar.

This template includes the following templates:

  • N/A.

Template Code

	<div id="primary" class="sidebar">
		<ul class="xoxo">
<?php if (!function_exists('dynamic_sidebar') || !dynamic_sidebar(1) ) : // begin primary sidebar widgets ?>

			<li id="pages">
				<h3><?php _e('Pages', 'sandbox') ?></h3>
				<ul>
<?php wp_list_pages('title_li=&sort_column=post_title' ) ?>
				</ul>
			</li>

			<li id="categories">
				<h3><?php _e('Categories', 'sandbox'); ?></h3>
				<ul>
<?php wp_list_categories('title_li=&show_count=0&hierarchical=1') ?> 

				</ul>
			</li>

			<li id="archives">
				<h3><?php _e('Archives', 'sandbox') ?></h3>
				<ul>
<?php wp_get_archives('type=monthly') ?>

				</ul>
			</li>
<?php endif; // end primary sidebar widgets  ?>
		</ul>
	</div><!-- #primary .sidebar -->

	<div id="secondary" class="sidebar">
		<ul class="xoxo">
<?php if (!function_exists('dynamic_sidebar') || !dynamic_sidebar(2) ) : // begin  secondary sidebar widgets ?>
			<li id="search">
				<h3><label for="s"><?php _e('Search', 'sandbox') ?></label></h3>
				<form id="searchform" method="get" action="<?php bloginfo('home') ?>">
					<div>
						<input id="s" name="s" type="text" value="<?php echo wp_specialchars(stripslashes($_GET['s']), true) ?>" size="10" tabindex="1" />
						<input id="searchsubmit" name="searchsubmit" type="submit" value="<?php _e('Find', 'sandbox') ?>" tabindex="2" />
					</div>
				</form>
			</li>

<?php wp_list_bookmarks('title_before=<h3>&title_after=</h3>&show_images=1') ?>

			<li id="rss-links">
				<h3><?php _e('RSS Feeds', 'sandbox') ?></h3>
				<ul>
					<li><a href="<?php bloginfo('rss2_url') ?>" title="<?php echo wp_specialchars(get_bloginfo('name'), 1) ?> <?php _e('Posts RSS feed', 'sandbox'); ?>" rel="alternate" type="application/rss+xml"><?php _e('All posts', 'sandbox') ?></a></li>
					<li><a href="<?php bloginfo('comments_rss2_url') ?>" title="<?php echo wp_specialchars(bloginfo('name'), 1) ?> <?php _e('Comments RSS feed', 'sandbox'); ?>" rel="alternate" type="application/rss+xml"><?php _e('All comments', 'sandbox') ?></a></li>
				</ul>
			</li>

			<li id="meta">
				<h3><?php _e('Meta', 'sandbox') ?></h3>
				<ul>
					<?php wp_register() ?>

					<li><?php wp_loginout() ?></li>
					<?php wp_meta() ?>

				</ul>
			</li>
<?php endif; // end secondary sidebar widgets  ?>
		</ul>
	</div>
	<!-- #secondary .sidebar -->

This template includes the following tags:

  • _e() is a WordPress function used to mark a string for translation to another language. It is similar to __(), except that __() returns the string while _e() echoes it.
  • bloginfo() is a WordPress function that displays information about your blog. Using various parameters, the function can display the following strings:
    • Blog title;
    • Blog tagline;
    • Administrator's email address;
    • Document content-type;
    • Document charset;
    • WordPress version;
    • Blog URL;
    • Pingback URL;
    • URL of the RSS 0.92, RSS 1.0, RSS 2.0, or Atom feed;
    • URL of the comments feed;
    • URL of the directory in which WordPress is installed;
    • URL of the current template's directory;
    • URL of the current style.css file;
    • URL of the stylesheet directory (deprecated)
  • dynamic_sidebar() is a WordPress tag which creates the widgetized sidebar.
  • function_exists() is a PHP function handling function which returns true if a given function has been defined.
  • get_bloginfo() is a WordPress tag which returns information about your blog.
  • stripslashes() is a PHP function that strips backslashes from a string. Single backslashes are removed entirely; a double backslash is replaced with a single backslash.
  • wp_get_archives() is a WordPress tag which displays a list of archives in chronological order. It replaces get_archives(), which has been deprecated.
  • wp_list_bookmarks() is a WordPress tag which displays the blogroll.
  • wp_list_categories() is a WordPress tag which displays a list of categories. It replaces the deprecated list_cats() and wp_list_cats().
  • wp_list_pages() is a WordPress tag which displays a list of WordPress pages.
  • wp_loginout() Displays a login or logout link, depending on whether the user is logged in.
  • wp_meta() is a WordPress hook.
  • wp_register() is a WordPress tag which displays a "Register" or "Site Admin" link, depending on whether the user is logged in.
  • wp_specialchars() is a WordPress function that is "like the PHP function htmlspecialchars except it doesn't double-encode HTML entities." (Function Reference)

HTML Skeleton

HERE

Related CSS Styles

Resources