Hallo zusammen
wenn ich folgenden Code in die loop.php packe, wird auf keiner einzigen Seite mehr der Content ausgegeben.
Neuer Code:
<?php if ( is_category() ) : // Only display excerpts for categories. ?>
<div class="video-box">
<div class="video-thumb">
<a href="<?php the_permalink(); ?>" title="<?php printf( esc_attr__( 'Permalink to %s', 'twentyten' ), the_title_attribute( 'echo=0' ) ); ?>">
<div class="play-button"></div>
<?php if ( function_exists('has_post_thumbnail') && has_post_thumbnail() ) { the_post_thumbnail(array(150,150)); } ?>
</a>
</div>
<div><h2 class="entry-title"><a href="<?php the_permalink(); ?>" title="<?php printf( esc_attr__( 'Permalink to %s', 'twentyten' ), the_title_attribute( 'echo=0' ) ); ?>" rel="bookmark"><?php the_title(); ?></a></h2></div>
<div class="entry-meta">
<?php include ( TEMPLATEPATH . '/panel.php' ); ?>
</div><!-- .entry-meta -->
</div><!-- .video-box -->
<?php else; ?>
Alles anzeigen
Abschnitt in der loop.php
<?php /* How to display all other posts. */ ?>
<?php else : ?>
<div class="entry-utility">
<?php if ( count( get_the_category() ) ) : ?>
<span class="cat-links">
<?php printf( __( '%2$s', 'twentyten' ), 'entry-utility-prep entry-utility-prep-cat-links', get_the_category_list( ', ' ) ); ?>
</span>
<?php endif; ?>
<?php
$tags_list = get_the_tag_list( '', ', ' );
if ( $tags_list ):
?>
<span class="tag-links"><?php printf( __( '<span class="%1$s">Tagged</span> %2$s', 'twentyten' ), 'entry-utility-prep entry-utility-prep-tag-links', $tags_list ); ?></span>
<span class="meta-sep">|</span>
<?php endif; ?>
</div><!-- .entry-utility -->
<div id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
<?php if ( is_archive() || is_search() ) : // Only display excerpts for archives and search. ?>
<div class="video-box">
<div class="video-thumb">
<a href="<?php the_permalink(); ?>" title="<?php printf( esc_attr__( 'Permalink to %s', 'twentyten' ), the_title_attribute( 'echo=0' ) ); ?>">
<div class="play-button"></div>
<?php if ( function_exists('has_post_thumbnail') && has_post_thumbnail() ) { the_post_thumbnail(array(150,150)); } ?>
</a>
</div>
<div><h2 class="entry-title"><a href="<?php the_permalink(); ?>" title="<?php printf( esc_attr__( 'Permalink to %s', 'twentyten' ), the_title_attribute( 'echo=0' ) ); ?>" rel="bookmark"><?php the_title(); ?></a></h2></div>
<div class="entry-meta">
<?php include ( TEMPLATEPATH . '/panel.php' ); ?>
</div><!-- .entry-meta -->
</div><!-- .video-box -->
<?php else : ?>
<div class="video-box">
<div class="video-thumb">
<a href="<?php the_permalink(); ?>" title="<?php printf( esc_attr__( 'Permalink to %s', 'twentyten' ), the_title_attribute( 'echo=0' ) ); ?>">
<div class="play-button"></div>
<?php if ( function_exists('has_post_thumbnail') && has_post_thumbnail() ) { the_post_thumbnail(array(150,150)); } ?>
</a>
</div>
<div><h2 class="entry-title"><a href="<?php the_permalink(); ?>" title="<?php printf( esc_attr__( 'Permalink to %s', 'twentyten' ), the_title_attribute( 'echo=0' ) ); ?>" rel="bookmark"><?php the_title(); ?></a></h2></div>
<div class="entry-meta">
<?php include ( TEMPLATEPATH . '/panel.php' ); ?>
</div><!-- .entry-meta -->
</div><!-- .video-box -->
<?php endif; ?>
</div><!-- #post-## -->
<?php endif; // This was the if statement that broke the loop into three parts based on categories. ?>
<?php endwhile; // End the loop. Whew. ?>
<?php /* Display navigation to next/previous pages when applicable */ ?>
<?php include ( TEMPLATEPATH . '/paging.php' ); ?>
Alles anzeigen
Was ich eigentlich möchte?
Über den Kategorien soll "get_the_category" nicht erscheinen, also folgender Code:
<div class="entry-utility">
<?php if ( count( get_the_category() ) ) : ?>
<span class="cat-links">
<?php printf( __( '%2$s', 'twentyten' ), 'entry-utility-prep entry-utility-prep-cat-links', get_the_category_list( ', ' ) ); ?>
</span>
<?php endif; ?>
<?php
$tags_list = get_the_tag_list( '', ', ' );
if ( $tags_list ):
?>
<span class="tag-links"><?php printf( __( '<span class="%1$s">Tagged</span> %2$s', 'twentyten' ), 'entry-utility-prep entry-utility-prep-tag-links', $tags_list ); ?></span>
<span class="meta-sep">|</span>
<?php endif; ?>
</div><!-- .entry-utility -->
Alles anzeigen
Bisheriges Problem:
Schaffe es leider noch nicht einmal auf der Kategorie-Seite etwas anderes auszugeben (siehe oben). :(