Hallo,
auf die Gefahr hin etwas übersehen zu haben, bitte ich dennoch um Hilfe, da ich als PHP-Gurke nicht so recht weiß, was ich an meinem Fehler korrigieren kann.
Ich möchte auf einer Page Thumbnails und Titel einer Auswahl an Posts listen als Übersicht ohne Content, ohne Exzerpt. Ich habe mir folgenden Code zusammengeschustert unter Benutztung des Plug-Ins phpEXEC:
<div class="collection">
<?php query_posts('meta_value=key_name&orderby=title&order=ASC'); ?>
<ul>
<?php while ( have_posts() ) : the_post(); ?>
<li class="clearfloat"><a href="<?php the_permalink() ?>" rel="bookmark" title="<?php the_title_attribute(); ?>"><?php echo get_post_image (get_the_id(), '', '', '' .get_bloginfo('template_url') .'/scripts/timthumb.php?zc=1&w=140&h=110&src='); ?></a>
<a href="<?php the_permalink() ?>" rel="bookmark">
<p class="proname"><a href="<?php the_permalink() ?>" rel="bookmark" title="<?php the_title_attribute(); ?>"><?php the_title(); ?></a></p>
</a>
</li>
<?php endwhile; ?>
</ul>
</div>
Alles anzeigen
Das Resultat sieht genauso aus, wie ich es gern hätte, der Code funktioniert, würden unter dem Ganzen nicht auch noch die Inhalte all dieser Artikel mit allem drum und dran ausgespuckt werden.
Ich verwende das kostenlose MIMBO-Theme , in dem auch ein Loop für die Featured Category verwendet wird. Diese lasse ich ebenfalls einzig mit den Thumbnails anzeigen und das funtkioniert, doch leider durchschaue ich den Code nicht ausreichend, um die Unterschiede zu meinem herauszufinden, da er die Variablen aus dem admin-Menü entnimmt.
So sieht es auf index aus:
<div id="featured-cats">
<?php
$display_categories = get_option('openbook_cats');
foreach ($display_categories as $category) {
$showposts = get_option('openbook_featured_posts');
query_posts("showposts=$showposts&cat=$category");
?>
<h3><a href="<?php echo get_category_link($category);?>"><?php single_cat_title(); ?></a></h3>
<ul id="feat-thumb">
<?php while (have_posts()) : the_post(); ?>
<li class="clearfloat"><a href="<?php the_permalink() ?>" rel="bookmark" title="<?php the_title_attribute(); ?>"><?php echo get_post_image (get_the_id(), '', '', '' .get_bloginfo('template_url') .'/scripts/timthumb.php?zc=1&w=120&h=90&src='); ?>
<?php if ( get_post_meta($post->ID, 'title') ) : ?>
<a href="<?php the_permalink() ?>" rel="bookmark">
<p class="macletitle"><?php echo get_post_meta($post->ID, 'title', true) ?></p>
</a>
<?php endif; ?>
</li><?php endwhile; ?>
Alles anzeigen
Hat jemand von euch einen Tipp, wie ich umgehe, dass Inhalte auf der Seite gelistet werden oder ist das unvermeidbar? Ich bedanke mich im Voraus.