Hallo zusammen,
als Neuling, sowohl in der Materie als auch im Forum, hoffe ich, dass ich hier richrig bin und die Frage richtig formulieren kann.
Ich benutze das theme cover-wp (hab's allerdings etwas verändert) und bekomme kein excerpt angezeigt, sondern immer nur den ersten Teil des gesamten Beitrags (besonders blöd, da ich Tabellen verwende). Der Code auf home.php für die erste Content-Box von meiner Seite
PHP
<div id="headline">
<h3><?php _e('Headline','cover-wp') ?></h3>
<?php query_posts("showposts=1"); $i = 1; ?>
<?php if(have_posts()) : while(have_posts()) : the_post(); ?>
<?php $words = 75;
$content = get_the_excerpt();
$excerpt = explode(' ',$content); ?>
<h2><a href="<?php the_permalink(); ?>" rel="bookmark" title="<?php _e('Permanent Link to','cover-wp') ?> <?php the_title_attribute(); ?>"><?php the_title(); ?></a></h2>
<div class="the_content">
<?php
$values = get_post_custom_values("Image");
if(!$values) $values = get_post_custom_values("image");
$catch = catch_that_image();
if ( function_exists( 'has_post_thumbnail' ) && has_post_thumbnail() )
{
$title = get_the_title();
the_post_thumbnail(array(230,165), array('alt' => $title));
}
elseif($values)
{ ?>
<img src="<?php echo bloginfo('template_url'); ?>/scripts/timthumb.php?src=<?php echo $values[0]; ?>&w=230&h=165&zc=1&q=100" alt="<?php the_title(); ?>" width="230" height="165" border="0" />
<?php }
elseif($catch)
{ ?>
<img src="<?php echo bloginfo('template_url'); ?>/scripts/timthumb.php?src=<?php echo $catch; ?>&w=230&h=165&zc=1&q=100" alt="<?php the_title(); ?>" width="230" height="165" border="0" />
<?php }
else $words = $words + 55; ?>
<p><?php for($i = 0; $i <= $words - 1; $i++) { echo $excerpt[$i]; echo ' '; } echo '…'; ?> <a href="<?php the_permalink() ?>"><?php _e('Read entire article','cover-wp') ?> »</a></p>
</div><!-- /the_content -->
<?php endwhile; ?>
<?php wp_reset_query(); ?>
<?php else: ?>
<h2 class="center"><?php _e('No Entries Found','cover-wp') ?></h2>
<p class="center"><?php _e('There are no entries in this blog.','cover-wp') ?></p>
<?php endif; ?>
</div><!-- /headline -->
Alles anzeigen
Die images funktionieren prima, für excerpt-Hilfe wäre ich sehr dankbar. (sorry, wenn es zuviel Code ist)