Hey leute, ich habe in problem bei meiner themeentwicklung. nämlich: Die artikel wechseln sich ab. Heißt erster Artikel rot, 2ter blau, 3ter rot, 4ter blau, 5ter rot und so weiter. Die hat auch schon geklappt. Dann habe ich noch nen fy.slider von mootools hinzugefügt und den ersten Artikel abgegrenzt. Seit dem funktioniert das mit dem Wechsel nichtmehr.... Hier mal der link . http://www.ludk.de/wordpress
und hier der code.
PHP
<?php
/**
* @package WordPress
* @subpackage Basis_Theme
* @template index
*/
get_header(); ?>
<?php $oddpost = 'altpost'; ?>
<?php if ( have_posts() ) : ?>
<?php $top_query = new WP_Query('showposts=1'); ?>
<?php while($top_query->have_posts()) : $top_query->the_post();
$do_not_duplicate = $post->ID; ?>
<div class="first">
<div class="thumb"><img src='<?php echo p75GetThumbnail($post->ID, 290, 290); ?>' alt='post thumbnail' /></div>
<h3 class="title1"><?php the_title(); ?></h3>
<?php the_excerpt() ?>
</div>
<?php endwhile; ?>
<div class="second">
<?php $top_query = new WP_Query('showposts=7&offset=1'); ?>
<?php while($top_query->have_posts()) : $top_query->the_post();
$do_not_duplicate = $post->ID; ?>
<div class="<?php echo $oddpost; ?>" id="post-<?php the_ID(); ?>">
<div <?php if ( function_exists('post_class') ) { post_class(); } else { _e( 'class="post"'); } ?> id="post-<?php the_ID(); ?>">
<div id="accordion">
<h3 class="toggler">
<div class="thumb2"><img src='<?php echo p75GetThumbnail($post->ID, 50, 50); ?>' alt='post thumbnail' /></div>
<div class="title2"><?php the_title(); ?></div>
</h3>
<div class="element">
<div class="story">
<?php if ( is_archive() || is_search() ) { ?>
<?php the_excerpt() ?>
<p class="textright"><a href="<?php the_permalink() ?>" rel="bookmark"><?php _e( '... weiterlesen »', FB_BASIS_TEXTDOMAIN ); ?></a></p>
<p class="info"><?php _e( 'Aktualisiert am', FB_BASIS_TEXTDOMAIN ); ?> <?php the_modified_date(); ?> <?php edit_post_link( __( 'Editieren', FB_BASIS_TEXTDOMAIN ),' · ', ''); ?></p>
<?php } else { ?>
<?php the_content( the_title( '', '', false ) . ' ' . __( 'weiterlesen »', FB_BASIS_TEXTDOMAIN ) ); ?>
<?php wp_link_pages(); ?>
<?php } ?>
</div>
</div>
</div>
</div>
</div>
<?php endwhile; ?>
</div>
<?php if ('altpost' == $oddpost) $oddpost = 'erstpost'; else $oddpost = 'altpost'; ?>
<?php else: ?>
<p><?php _e( 'Nichts gefunden, was den Suchkriterien entspricht.', FB_BASIS_TEXTDOMAIN ); ?></p>
<?php endif; // end else ?>
Alles anzeigen
könnt ihr mir helfen, dass ich wieder "erstpost" definieren kann und nicht jeder Artikel "altpost ist" (ausgeschlossen dem Ersten) .... :cry:
Hoffe ja!
Liebe Grüße Lumo