NextGen Slideshow im Index des Themes einbauen
In meinem Blog http://www.kleinwagenblog.de wird das oberste große Foto des ersten Artikels eingeblendet. Ich möchte dieses Foto durch die NextGen Slideshow ersetzen.
Code des Index:
PHP
<?php get_header(); ?>
<?php include (TEMPLATEPATH . '/setting.php'); ?>
<!-- Body -->
<div id="mainbody">
<?php if ( is_search() ) { ?>
<div class="mainsearch">Suchergebnis: "<?php echo $s; ?>"</div>
<?php include (TEMPLATEPATH . '/result.php'); ?>
<?php } else { ?>
<div id="featured" >
<ul class="ui-tabs-nav">
<?php
$nom = 0;
$my_query = new WP_Query('showposts=4'); while ($my_query->have_posts()) : $my_query->the_post(); $do_not_duplicate = $post->ID; $nom = $nom + 1; ?>
<li class="ui-tabs-nav-item ui-tabs-selected" id="nav-fragment-<?php echo $nom; ?>"><a href="#fragment-<?php echo $nom; ?>">
<img src="<?php bloginfo('template_directory'); ?>/timthumb.php?src=<?php getImage('1'); ?>&h=50&w=80&zc=1" alt="<?php the_title_attribute(); ?>" />
<span><?php if(strlen($post->post_title)>50){echo substr($post->post_title,0,50).'...';}else{the_title();} ?></span></a></li>
<?php endwhile; ?>
</ul>
<?php
$nom = 0;
$my_query = new WP_Query('showposts=4'); while ($my_query->have_posts()) : $my_query->the_post(); $do_not_duplicate = $post->ID; $nom = $nom + 1; ?>
<!-- First Content -->
<div id="fragment-<?php echo $nom; ?>" class="ui-tabs-panel <?php if ($nom != 1) { echo "ui-tabs-hide"; }?>" style="">
<a href="<?php the_permalink(); ?>" title="<?php the_title_attribute(); ?>"><img src="<?php bloginfo('template_directory'); ?>/timthumb.php?src=<?php getImage('1'); ?>" alt="<?php the_title_attribute(); ?>" width="400px" height="250px" /></a>
</div>
<?php endwhile; ?>
</div>
<?php
$my_query = new WP_Query('showposts=1');
while ($my_query->have_posts()) : $my_query->the_post();
$do_not_duplicate = $post->ID;
?>
<div class="maincontent">
<div class="author"><?php echo get_avatar( get_the_author_email(), '50' ); ?></div>
<h1><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title_attribute(); ?>"><?php the_title(); ?></a></h1>
<div class="maindesc">Autor: <?php the_author() ?> Category: <?php the_category(' | '); ?> Datum: <?php the_time('F, d Y') ?> | <?php comments_popup_link('0 Kommentare', '1 Kommentar', '% Kommentare'); ?></div>
<div class="clear"></div>
<div class="thecontent">
<?php the_content(' '); ?>
</div>
<div class="more"><a href="<?php the_permalink() ?>">Weiterlesen...</a></div>
<div class="more"><?php comments_popup_link('0 Kommentare', '1 Kommentar', '% Kommentare'); ?></div>
<div class="clear"></div>
<?php
endwhile;
?>
</div>
<div class="mainleft">
<?php
if (have_posts()) : while (have_posts()) : the_post();
if( $post->ID == $do_not_duplicate ) continue; update_post_caches($posts);
?>
<div class="content">
<div class="thecontent">
<a href="<?php the_permalink(); ?>" title="<?php the_title_attribute(); ?>"><img src="<?php bloginfo('template_directory'); ?>/timthumb.php?src=<?php getImage('1'); ?>&h=100&w=100&zc=1" alt="<?php the_title_attribute(); ?>" class="archivethumb" /></a>
<h1><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title_attribute(); ?>"><?php the_title(); ?></a></h1>
<?php the_excerpt_feature(); ?>
</div>
<div class="clear"></div>
</div>
<?php
endwhile;
include (TEMPLATEPATH . '/paginate.php');
?>
<?php endif; ?>
</div>
<div class="mainright">
<div class="maintitle"><h2>Folgen Sie mir</h2></div>
<div class="twitter">
<ul id="twitter_update_list"></ul>
<script type="text/javascript" src="http://twitter.com/javascripts/blogger.js"></script>
<script type="text/javascript" src="http://twitter.com/statuses/user_timeline/<?php echo $twitterID; ?>.json?callback=twitterCallback2&count=5"></script>
</div>
<a href="http://www.twitter.com/<?php echo $twitterID; ?>" target="_blank"><img src="<?php bloginfo('template_directory'); echo '/images/twitbutton.png'; ?>" alt="Folgen Sie mir auf Twitter" /></a>
</div>
<div class="clear"></div>
<?php } ?>
</div>
<!-- Body -->
<?php get_sidebar(); ?>
<?php get_footer(); ?>
Alles anzeigen
Ist der Code für die Slideshow so richtig:
PHP
<?php
if (function_exists("nggSlideshowWidget"))
nggSlideshowWidget("galleryID=0","Width=400","Height=250");
?>
</div>
<?php endwhile; ?>
Wie füge ich die Slideshow richtig ein, damit es funktioniert?
Viele Grüße
Bluebird