Hallo an alle,
ich möchte in meinen Bloghttp://www.babypyramide.de/blog
eine zweite Sidebar links neben der 1 einrichten.
Die bisherigen Verusche waren bis jetzt nicht sehr erfolgreich.
Ich hoffe ihr könnt mir da weiterhelfen?
Sidebar-1
PHP
<div class="column-left">
<?php
wp_page_menu('show_home=0&sort_column=menu_order, post_title&link_before=&link_after=');
?>
<?php /* Widgetized sidebar, if you have the plugin installed. */ ?>
<!-- Author information is disabled per default. Uncomment and fill in your details if you want to use it.
<li><h2>Author</h2>
<p>A little something about you, the author. Nothing lengthy, just an overview.</p>
</li>
-->
<?php if ( is_404() || is_category() || is_day() || is_month() ||
is_year() || is_search() || is_paged() ) {
?>
<?php /* If this is a 404 page */ if (is_404()) { ?>
<?php /* If this is a category archive */ } elseif (is_category()) { ?>
<?php /* If this is a yearly archive */ } elseif (is_day()) { ?>
<p class="info-sidebar">You are currently browsing the <a href="<?php bloginfo('url'); ?>/"><?php echo bloginfo('name'); ?></a> blog archives
for the day <?php the_time('l, F jS, Y'); ?>.</p>
<?php /* If this is a monthly archive */ } elseif (is_month()) { ?>
<p class="info-sidebar">You are currently browsing the <a href="<?php bloginfo('url'); ?>/"><?php echo bloginfo('name'); ?></a> blog archives
for <?php the_time('F, Y'); ?>.</p>
<?php /* If this is a yearly archive */ } elseif (is_year()) { ?>
<p class="info-sidebar">You are currently browsing the <a href="<?php bloginfo('url'); ?>/"><?php echo bloginfo('name'); ?></a> blog archives
for the year <?php the_time('Y'); ?>.</p>
<?php /* If this is a monthly archive */ } elseif (is_search()) { ?>
<?php /* If this is a monthly archive */ } elseif (isset($_GET['paged']) && !empty($_GET['paged'])) { ?>
<p class="info-sidebar">You are currently browsing the <a href="<?php echo bloginfo('url'); ?>/"><?php echo bloginfo('name'); ?></a> blog archives.</p>
<?php } ?>
<?php }?>
<?php if ( function_exists('dynamic_sidebar') && dynamic_sidebar(__('Left Sidebar','theme905')) ) : else : ?>
<div class="widget widget_categories">
<div class="widget-bg">
<div class="title">
<h2><?php _e('Categories','theme905'); ?></h2>
</div>
<ul>
<?php wp_list_categories('show_count=&title_li='); ?>
</ul>
</div>
</div>
<div class="widget widget_meta">
<div class="widget-bg">
<div class="title">
<h2><?php _e('Meta','theme905'); ?></h2>
</div>
<ul>
<?php wp_register(); ?>
<li><?php wp_loginout(); ?></li>
<li><a href="http://www.w3.org/" title="This page The World Wide Web Consortium (W3C)"><abbr title="World Wide Web Consortium">W3C</abbr> Page</a></li>
<li><a href="http://gmpg.org/xfn/"><abbr title="XHTML Friends Network">XFN</abbr></a></li>
<li><a href="http://wordpress.org/" title="Powered by WordPress, state-of-the-art semantic personal publishing platform.">WordPress</a></li>
<?php wp_meta(); ?>
</ul>
</div>
</div>
<?php endif; ?>
Alles anzeigen
funktions
PHP
<?php
if ( function_exists('register_sidebar') )
register_sidebar(array(
'name' => __('Left Sidebar', 'theme905'),
'before_widget' => ' <div id="%1$s" class="widget %2$s"><div class="widget-bg">',
'before_title' => ' <div class="title"><h2>',
'after_title' => ' </h2></div>',
'after_widget' => ' </div></div>',
));
// Search
function widget_theme905_search() {
?>
<div class="widget" id="search"><div class="widget-bg">
<div class="title">
<h2><?php _e('Site Search','theme905'); ?></h2>
</div>
<form method="get" id="searchform" action="<?php bloginfo('home'); ?>">
<input type="text" class="text" value="<?php the_search_query(); ?>" name="s" id="s" /> <input class="but" type="image" src="<?php bloginfo('stylesheet_directory'); ?>/images/search2.gif" value="submit" />
</form>
</div></div>
<?php
}
if ( function_exists('register_sidebar_widget') )
register_sidebar_widget(__('Search'), 'widget_theme905_search');
?>
Alles anzeigen
index
PHP
<?php get_header(); ?>
<?php get_sidebar(1); ?>
<?php if (have_posts()) : ?>
<?php while (have_posts()) : the_post(); ?>
<div <?php post_class() ?> id="post-<?php the_ID(); ?>">
<div class="indent png"><div class="indent-bg">
<div class="date png">
<span><?php the_time('j') ?></span><?php the_time('M') ?>
</div>
<div class="title">
<h2><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title_attribute(); ?>"><?php the_title(); ?></a></h2>
</div>
<div class="comments"><?php comments_popup_link('0 Kommentare', '1 Kommentar', '% Kommentare'); ?></div>
<div class="text-box">
<?php the_content(''); ?>
</div>
<div class="postmetadata"><?php the_tags('Tags: ', ', ', '<br />'); ?></div>
<div class="more-link">
<a href="<?php the_permalink() ?>#more-<?php the_id() ?>">Weiterlesen</a>
</div>
<div class="link-edit">
<?php edit_post_link('Artikel bearbeiten', ''); ?>
</div>
</div></div>
</div>
<?php endwhile; ?>
<div class="navigation">
<div class="alignleft"><?php previous_posts_link('< neuere Artikel') ?></div>
<div class="alignright"><?php next_posts_link('ältere Artikel >') ?></div>
</div>
<?php else : ?>
<h2 class="pagetitle">Not Found</h2>
<p class="center">Sorry, but you are looking for something that isn't here.</p>
<?php get_search_form(); ?>
<?php endif; ?>
<?php get_footer(); ?>
Alles anzeigen
Gruß
Philipp