Hallo!
Ich glaube, hier bin ich richtig. Ich habe ebenfalls noch keine Ahnung von php und habe ebenfalls das Problem, dass ich eine Sidebar von links nach rechts haben möchte. Dabei sei mir zwischendurch die Frage erlaubt: Warum gibt es so viele Themes mit der Sidebar rechts, wenn doch eigentlich überall und jeder die Sidebar links möchte und erwartet...? Ein Mysterium...
Bei mir geht es um das Theme BlogLife vom WPlook Team (http://wplook.com/blogolifewpo).
Durch herum probieren und austesten habe ich es bislang geschafft, den Seiteninhalt rechts angezeigt zu bekommen (so, wie ich es will) aber die Sidebar ist keineswegs nach links, sondern vielmehr nach unten und das auch noch über die gesamte Fensterbreite gerutscht. Den Trick mit der index.php habe ich auch probiert. Ohne sichtbare Veränderung.
Die Änderungen meiner style.css sehen wie folgt aus (ich habe "right" durch "left" ersetzt):
[COLOR=#000000][FONT=Verdana]
[/FONT][/COLOR]/* --- --- [ Main ] --- --- */
/* --- [ Left Sidebar ] --- */
#main {
border-top: 1px solid #c5d1d9;
margin-top: -4px;
}
.left-sidebar #main {
background: #ffffff url(images/left-sidebar-border.png) top right repeat-y;
}
.left-sidebar #content {
width: 650px;
float: left;
margin: 20px 0 0 -10px;
}
.left-sidebar #secondary {
width: 290px;
float: left;
margin: 20px -10px 0 0;
}
Alles anzeigen
Die sidebar.php so (auch hier habe ich alle "right"-Einträge in "left" umgewandelt"):
<?php
/**
* The left sidebar file. By default we show Archives and Meta
* @package WPLOOK
* @subpackage BlogoLife
* @since BlogoLife 1.0
*/?>
<div id="secondary" class="widget-area" role="complementary">
<?php if ( ! dynamic_sidebar( 'sidebar-1' ) ) : ?>
<aside id="archives" class="widget">
<div class="widget-title"> <h3><?php _e( 'Archives', 'wplook' ); ?></h3>
<div class="left-corner"></div></div>
<ul>
<?php wp_get_archives( array( 'type' => 'monthly' ) ); ?>
</ul>
</aside>
<aside id="meta" class="widget">
<div class="widget-title"> <h3><?php _e( 'Meta', 'wplook' ); ?></h3>
<div class="left-corner"></div></div>
<ul>
<?php wp_register(); ?>
<li><?php wp_loginout(); ?></li>
<?php wp_meta(); ?>
</ul>
</aside>
<?php endif; // end sidebar widget area ?>
</div><!-- #secondary .widget-area -->
<div class="clear"></div>
Alles anzeigen
und die content-page.php:
<?php
/**
* The default template for displaying content
*
* @package wplook
* @subpackage BlogoLife
* @since BlogoLife 1.0
*/
?>
<div class="primary">
<div id="content">
<?php wplook_doctitle(); ?>
<?php if ( have_posts() ) : ?>
<?php /* Start the Loop */ ?>
<?php while ( have_posts() ) : the_post(); ?>
<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
<div class="col1 fright">
<div class="postformat">
<div class="format-icon"></div>
<div class="right-corner"></div>
</div>
</div>
<div class="col2 fright">
<header class="entry-header">
<h1 class="entry-title"><a href="<?php the_permalink(); ?>" title="<?php printf( esc_attr__( 'Permalink to %s', 'wplook' ), the_title_attribute( 'echo=0' ) ); ?>" rel="bookmark"><?php the_title(); ?></a></h1></header>
<div class="entry-content">
<?php the_content(); ?>
<?php wp_link_pages( array( 'before' => '<div class="clear"></div><div class="page-link"><span>' . __( 'Pages:', 'wplook' ) . '</span>', 'after' => '</div>' ) ); ?>
<!-- .entry-content -->
<div class="clear"></div>
<div class="entry-utility">
<?php if ( the_category ( '', ', ' ) ) { ?>
<div class="category">
<b><?php _e('Category:', 'wplook'); ?></b>
<?php the_category(', ') ?>
<div class="end"></div>
</div>
<?php } ?>
<?php if ( get_the_tag_list( '', ', ' ) ) { ?>
<div class="tag">
<b><?php _e('Tag:', 'wplook'); ?></b>
<?php echo get_the_tag_list('',', ',''); ?>
<div class="end"></div>
</div>
<?php } ?>
</div>
<div class="clear"></div>
</div><!-- .entry-content -->
<footer class="entry-meta">
<div class="date-i fleft"><a href="<?php the_permalink(); ?>" title="<?php printf( esc_attr__( 'Permalink to %s', 'wplook' ), the_title_attribute( 'echo=0' ) ); ?>" rel="nofollow"><?php wplook_get_date_time();?></a></div>
<?php if ( comments_open() ) : ?>
<div class="comment-i fleft"><?php comments_popup_link(__('No comments', 'wplook'), __('1 comment', 'wplook'), __('% comments', 'wplook'), 'comments-link', __('Comments off', 'wplook')); ?></div>
<?php endif; ?>
<div class="author-i fleft"><?php wplook_get_author();?></div>
<?php edit_post_link( __( 'Edit', 'wplook' ), '<div class="edit-i fright">', '</div>' ); ?>
<div class="clear"></div>
</footer>
</div>
<div class="clear"></div>
</article>
<?php comments_template( '', true ); ?>
<?php endwhile; ?>
<?php endif; ?>
</div><!-- #content -->
</div><!-- #primary -->
Alles anzeigen
Ich bin dankbar um jede Hilfestellung, die mich zum Ergebnis meines Wunsches bringt. Nämlich, die Sidebar von rechts nach links zu bringen. Ansonsten soll das Theme bleiben, wie es ist.
Vielen Dank im Voraus!
Grüße
Stefan