Hallo Forum,
zuerst muss ich sagen, dass ich wirklich versucht habe mir selbst zu helfen, habe die FAQs gelesen und das Forum durchsucht. Doch alles was ich probiere ist gescheitert - ausser einer Plugin-Installation, die ich bisher noch nicht probiert habe. Ich würde es aber gerne ohne Plugin machen.
Mein Problem hört sich recht einfach an:
Ich möchte die Länge der Artikel (2 Spalten Design, also 2 Artikel nebeneinander) selbst, individuell für jeden Artikel bestimmen, je nach Bedarf. Meine Idee war, global einzustellen für ALLE Artikel, das sie immer komplett angezeigt werden, und dann wenn ich es für nötig finde einen Umbruch mit "more" selbst zu definieren.
Alles was ich über das "excerpt" bzw. "content" gelesen und versucht habe klappt nicht. Ich poste hier mal den code des Haupttemplates und hoffe das mir jemand helfen kann. Danke schon mal im voraus.
Wie ihr seht, steht da in der 18.Zeile:
<?php the_content('continue reading') ?>
Hat es damit was zu tun?
Hier der komplette Code:
<?php get_header(); ?>
<div id="primary" class="twocol-stories">
<div class="inside">
<?php
query_posts('showposts=2');
?>
<?php if (have_posts()) : ?>
<?php $first = true; ?>
<?php while (have_posts()) : the_post(); ?>
<div class="story<?php if($first == true) echo " first" ?>">
<h2><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title(); ?>"><?php the_title(); ?></a></h2>
<div class="details">
<?php the_time('M d');?> | <?php the_category(', ') ?> | <?php if(function_exists('the_tags')) {$my_tags = get_the_tags();if ( $my_tags != "" ){ the_tags('Tags: ', ', ', '<br />'); } else {echo "Tags: None";} }?><?php if(function_exists('UTW_ShowTagsForCurrentPost')) { echo 'Tags: ';UTW_ShowTagsForCurrentPost("commalist");echo '<br />'; } ?>
</div>
<?php the_content('continue reading') ?>
<?php edit_post_link('Edit this', '', ''); ?>
<div class="details">
<?php comments_popup_link('no comments', '1 comment', '% comments'); ?> for now | <span class="read-on"><a href="<?php the_permalink() ?>">read on</a></span>
</div>
</div>
<?php if($first==true) { $first= false;} else {echo '<div class="clear"></div>';$first= true; } ?>
<?php endwhile; ?>
<?php else : ?>
<h2 class="center">Not Found</h2>
<p class="center">Sorry, but you are looking for something that isn't here.</p>
<?php include (TEMPLATEPATH . "/searchform.php"); ?>
<?php endif; ?>
<div class="clear"></div>
</div>
</div>
<?php get_sidebar(); ?>
<?php get_footer(); ?>
Alles anzeigen