Hallo,
ich habe eine neue Template in Word erstellt aber, ich habe Probleme mit der Anordnung der Sidebar die wird nämlich jetzt unter dem Content dargestellt. kann mir da jemand helfen?
Startseite.php
PHP
<?php
/*
Template Name: Startseite
*/
?>
<?php get_header(); ?>
<div id="content">
<div id="content-main">
<?php global $more; $more = 0; ?>
<?php query_posts('posts_per_page=1&cat=3&paged='.$last); ?>
<?php if (have_posts()) : ?>
<!-- <h3>→ <?php the_title(); ?></h3> -->
<!-- <?php previous_posts_link('<< Seite') ?>
<?php next_posts_link('Seite >>') ?> -->
<?php while (have_posts()) : the_post(); ?>
<h3><id ="post-<?php the_ID(); ?>"><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link zu: < ?php the_title(); ?>">
<?php the_title(); ?></a></id></h3>
<div class="entry">
<?php the_content(); ?>
</div>
</div>
</div>
<?php endwhile; ?>
<?php else : ?>
<?php include (TEMPLATEPATH . "/searchform.php"); ?>
<?php endif; ?>
<?php get_sidebar();?>
<?php get_footer();?>
Alles anzeigen
index.php --> vom Theme
PHP
<?php get_header();?>
<div id="content">
<div id="content-main">
<?php if ($posts) {
$AsideId = get_settings('mistylook_asideid');
function ml_hack($str)
{
return preg_replace('|</ul>\s*<ul class="asides">|', '', $str);
}
ob_start('ml_hack');
foreach($posts as $post)
{
start_wp();
?>
<?php if ( in_category($AsideId) && !is_single() ) : ?>
<ul class="asides">
<li id="p<?php the_ID(); ?>">
<?php echo wptexturize($post->post_content); ?>
<br/>
<?php comments_popup_link('(0)', '(1)','(%)')?> | <a href="<?php the_permalink(); ?>" title="Permalink: <?php echo wptexturize(strip_tags(stripslashes($post->post_title), '')); ?>" rel="bookmark">#</a> <?php edit_post_link('(Bearbeiten)'); ?>
</li>
</ul>
<?php else: // If it's a regular post or a permalink page ?>
<div class="post" id="post-<?php the_ID(); ?>">
<div class="posttitle">
<h2><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link zu <?php the_title(); ?>"><?php the_title(); ?></a></h2>
<p class="post-info"><?php the_time('j. F Y') ?> von <?php the_author_posts_link() ?> <?php edit_post_link('Bearbeiten', '', ' | '); ?> </p>
</div>
<div class="entry">
<?php the_content('Weiterlesen »'); ?>
<?php wp_link_pages(); ?>
</div>
<p class="postmetadata">Geschrieben in <?php the_category(', ') ?> | <?php comments_popup_link('0 Kommentare »', ' Kommentar »', '% Kommentare »'); ?></p>
<?php comments_template(); ?>
</div>
<?php endif; // end if in category ?>
<?php
}
}
else
{ ?>
<h2 class="center">Nicht Gefunden</h2>
<p class="center">Endschuldige, doch was du hier Suchst gibt es nicht.</p>
<?php }
?>
<p align="center"><?php posts_nav_link(' - ','« Neuere Artikel','Ältere Artikel »') ?></p>
</div><!-- end id:content-main -->
<?php get_sidebar();?>
<?php get_footer();?>
Alles anzeigen