Hallo Leute,
ich habe das Problem das ich den "while (have_posts()" bereits für für meinen Kwicks Slider benötige. Wenn ich dann natürlich weiter unten meinen single Beitrag per "while (have_posts()" einfügen will, damit mein Beitrag vollständig angezeigt wird gibt er mir alle Beiträge aus. Vielleicht liegt der Fehler auch in den Permalinks ? Ich habe jetzt schon 3 stunden gegoogelt und gelesen und finde einfach keine Lösung für mein Problem.
Um das ganze Live zu sehen http://www.epic-society.eu
Um es auf den Punkt zu bringen:
Es werden alle Beiträge ausgegeben obwohl ich nur einen bestimmten vollständig ausgeben will - Geht aber nicht, es werden die letzten 5 angezeigt.
Function für den Kwicks-Slider (Wird weiter oben geladen ist in der function.php)
function slideshow_featured_posts() { wp_reset_query(); $featured = 1; // Assuming that the name of the category ID number 1 is "Featured". $count = 5; // How many post to be shown as slides. It should be any number that can be divide the width of the container equally. query_posts('showposts=' . $count . '&cat=' . $featured);?><div id="slideshow"> <ul class="list"> <?php while (have_posts()) : the_post(); ?> <li class="item"> <span class="slider-shadow"></span> <div class="slideshow-title"> <a href="<?php the_permalink(); ?>" title="Permanent Link to <?php the_title_attribute(); ?>"><?php the_title(); ?></a> </div> <div class="image"> <a href="<?php the_permalink(); ?>" title="Permanent Link to <?php the_title_attribute(); ?>"> <?php if (has_post_thumbnail()) { the_post_thumbnail('accordion'); } ?> </a> </div> </li> <?php endwhile; ?> </ul></div><?php }
Auszug der Single.php
<div id="interactive"><!-- Pos. Interactive Slider, Carousel etc. --> <div id="accordion-wrapper"> <?php slideshow_featured_posts(); ?> </div> </div> <div class="clear"></div> <div id="content-main-all"> <div id="content-left"> <?php if (have_posts()) : ?><?php while (have_posts()) : the_post(); ?> <div class="news-content"> <div class="news-data"> <div class="news-thumb"> <a href="<?php the_permalink(); ?>"><?php the_post_thumbnail(array( 250,9999 ), array( 'class' => 'recent-thumbs' )); ?></a> </div> <div class="meta-trenner"></div> <div class="news-meta-container"> <div class="meta-content"> <?php the_time('d.M.Y') ?> // <?php the_author(); ?> </div> </div> </div> <div class="news-text"> <div class="title-style"><a href="<?php the_permalink(); ?>" title="Lesen Sie "<?php the_title(); ?>" vollständig"><?php the_title(); ?></a></div> <div class="content-text"> <?php the_content(); ?> </div> <div class="clear"></div> </div> <div class="clear"></div> </div> <div id="news-trenner"></div> <?php endwhile; endif; ?>
</div> <div id="content-right"> <div id="sidebar-epic-main"></div> <div id="sidebar-down"></div> <?php get_sidebar();?> </div> <div class="clear"></div> </div> <div id="puffer-footer"></div> </div><div class="clear"></div>
Vielen dank schon mal !
MfG Dean