Hallo zusammen,
ich habe ein kleines Problem in Justin Tadlocks Options-Theme. Ich habe in die single.php die Zeile
eingefügt. Sie liest das Feld "dach" aus. Das ist eine Dachzeile wie z.B. "Besucherrekord" in http://www.havenlog.de/titel/auswande…llion-voll/140/
Nun will ich diese auch auf der Startseite im Loop ausgeben. Das klappt nur nicht - es wird nichts angezeigt. :-x
Hier ist mein kompletter Loop:
PHP
<div id="excerpts" class="section">
<?php query_posts($query_string . '&cat=-8,-9,-3,-13,-14,-15'); ?>
<?php if(have_posts()) : while(have_posts()) : the_post(); ?>
<div class="post <?php echo $post_class; ?>">
<?php if($i == 1) : ?>
<h2 class="section-header"><?php _e('Aktuelle Artikel','options'); ?></h2>
<?php endif; ?>
<?php echo get_the_image_link(array('Thumbnail'),'thumbnail'); ?>
<h4>
<?php $key="dach"; echo get_post_meta($post->ID, $key, true); ?>
</h4>
<h3>
<a href="<?php the_permalink(); ?>" title="<?php the_title(); ?>"><?php the_title(); ?></a>
</h3>
<p class="byline">
<?php _e('By','options'); ?> <?php the_author_posts_link(); ?> •
<?php the_time(__('d.m.Y','options')); ?> •
<?php comments_popup_link(__('No Comments','options'), '1 '.__('Comment','options'), '% '.__('Comments','options'),'comments-link'); ?> •
<?php if(function_exists('the_views')) { the_views(); } ?>
<?php edit_post_link('<span class="edit-post">'.__('[Edit]','options').'</span>', ' ', ''); ?>
</p>
<div class="entry">
<?php the_excerpt(); ?>
</div>
<!--div class="post-meta-data">
<p>
<span class="categories"><?php _e('Categories: ','options'); ?> <?php the_category(', '); ?></span>
<br />
<span class="tags"><?php _e('Tags: ','options'); ?> <?php the_tags('', ', ', ''); ?></span>
</p>
</div -->
</div>
<?php
if('odd' == $post_class) $post_class = 'even';
else $post_class = 'odd';
$i++;
?>
<?php endwhile; ?>
Alles anzeigen
Kann mir da jemand einen Tipp geben?
Vielen Dank.
Beste Grüße
Frank