Hallo Leute,
ICH BRAUCHE UNBEDINGT EURE HILFE, ich steh leider an.
Mein theme-template das ich verwende hat 6x folgenden Code untereinander:
PHP
<ul class="latest">
<?php $feature_post = get_posts( 'category=2&numberposts=1' ); ?>
<?php foreach( $feature_post as $post ) : setup_postdata( $post ); ?>
<li><h2 class="latest"><?php
foreach((get_the_category()) as $category) {
echo $category->cat_name . ' ';
}
?></h2></li>
<?php endforeach; ?>
<?php $feature_post = get_posts( 'category=2&numberposts=3' ); ?>
<?php foreach( $feature_post as $post ) : setup_postdata( $post ); ?>
<?php if (function_exists('c2c_get_custom')) : ?>
<li><a href="<?php the_permalink(); ?>" title="<?php the_title(); ?>">
<?php echo c2c_get_custom('post-image','<img src="','" alt="<?php the_title(); ?>" class="post-image" />',''); ?></a></li>
<?php endif; ?>
<div class="news-element">
<li class="list-time"><?php the_date('j. F Y'); ?> <span class="home_comments"><?php comments_popup_link('', '1 Kommentar', '% Kommentare'); ?></span></li>
<li class="list-title"><a href="<?php the_permalink() ?>" rel="bookmark"><?php the_title(); ?></a></li>
<li class="latest-excerpt"><?php the_excerpt(); ?></li>
</div>
<?php endforeach; ?>
</ul>
Alles anzeigen
Das heißt mein Template baut auf 6Spalten (6Kategorien) die die Artikel dann tragen. Alles was ich erreichen will, ist:
Diejenige Kategorie die den zuletzt-veröffenltichten Artikel zeigt soll noch eine susätzliche id bekommen? also <ul class="latest" id="latestpost">
Habt ihr eine Idee wie ich das realisieren könnte?
Danke