Hallo,
ich versuche gerade auf der Startseite (unter dem Inhalt der Startseite) die Beiträge einer Kategorie vollständig anzuzeigen, bekomme es aber nur hin das die Überschrift mit Link angezeigt wird.
Es müsste irgendwie mit the_content() gehen, komme aber nich drauf...
Das ist der Code:
PHP
<?php
$posts = get_posts('numberposts=100&category=1');
foreach($posts as $post) : ?>
<br /><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link: <?php the_title(); ?>"><?php the_title(); ?></a><br />
<?php endforeach; ?>
Template sieht dann so aus:
PHP
<?php
/*
Template Name:Startseite
*/
get_header(); ?>
<div id="container" class="one-column">
<div id="content" role="main">
<?php if ( have_posts() ) while ( have_posts() ) : the_post(); ?>
<div id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
<?php if ( is_front_page() ) { ?>
<h2 class="entry-title"><?php the_title(); ?></h2>
<?php } else { ?>
<h1 class="entry-title"><?php the_title(); ?></h1>
<?php } ?>
<div class="entry-content">
<?php the_content(); ?>
<?php wp_link_pages( array( 'before' => '<div class="page-link">' . __( 'Pages:', 'twentyten' ), 'after' => '</div>' ) ); ?>
<?php edit_post_link( __( 'Edit', 'twentyten' ), '<span class="edit-link">', '</span>' ); ?>
<?php
$posts = get_posts('numberposts=100&category=1');
foreach($posts as $post) : ?>
<br /><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link: <?php the_title(); ?>"><?php the_title(); ?></a><br />
<?php endforeach; ?>
</div><!-- .entry-content -->
</div><!-- #post-## -->
<div class="entry-categorie">
</div><!-- .entry-categorie -->
<?php comments_template( '', true ); ?>
<?php endwhile; ?>
</div><!-- #content -->
</div><!-- #container -->
<?php get_footer(); ?>
Alles anzeigen
Vielen Dank für eure Mühe