Heyho,
Ich muss in dem CleanResponse Theme von Themefurnace die verschiedenen Kategorietitel durch jeweils verschiedene Logos austauschen. Ich hab ewig gesucht und in archive.php nichts gefunden. Letztendlich habe ich die Kategorietitel in categories.php gefunden.
Bin ich dort richtig? Ich kann dort schonmal den Kategorietitel editieren.
Bisher habe ich es geschafft ein Logo für alle Kategorien einzubinden, aber nicht zu bestimmen dass Logo1 bei Kategorie1 als Titel angezeigt wird.
Nach längeren Versuchen bin ich auf den Thread hier gestoßen und habe versucht das Ganze durch diesen if befehl zu lösen.
Ich verstehe nur sehr laienhaft php und bekomme beim Einbinden Fehlermeldungen.
Meine Frage(n):
Was mache ich falsch?
Ist das überhaupt die richtige .php Datei für mein Anliegen?
Original categories.php
<?php get_header(); ?>
<h1 class="posttitle"><?php _e('Category Archives','themefurnace') ?> - <?php single_cat_title() ?></h1>
<div id="postmeta"><ul>
</ul></div><!-- End Postmeta -->
<div id="main">
<?php while ( have_posts() ) : the_post() ?><div <?php post_class( 'blogitem'); ?> id="post-<?php the_ID(); ?>"><p><a href="<?php the_permalink(); ?>"><?php the_post_thumbnail('home-thumb', array('class' => 'blogimage')); ?></a></p><h3 class="itemintro"><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h3><p class="meta"><?php the_time('F j, Y') ?> - <a href="<?php the_permalink(); ?>#comments"><?php comments_number( '' . __('No Comments', 'themefurnace') . '', '' . __('One Comment', 'themefurnace') . '', '' . __('% Comments', 'themefurnace') . '' ); ?></a></p><?php the_excerpt(); ?><p><a href="<?php the_permalink(); ?>" class="button green more">Full Story »</a></p></div><?php endwhile; ?>
<?php wp_reset_query(); ?>
<?php themefurnace_pagination(); ?></div><!-- End Main --><?php get_sidebar(); ?><br class="clear" />
<?php get_footer(); ?>
Alles anzeigen
Meine editierte Datei
<?php get_header(); ?>
<h1 class="posttitle"> <?php if ( in_category( 'grotto.tv' )) { // <?php echo "<p><img src='http://grotto-tv.de/wp-content/uploads/2013/11/grotto.png' /></p>"; ?>} elseif ( in_category( array( 'easyoung' ) )) { // <?php echo "<p><img src='http://grotto-tv.de/wp-content/uploads/2013/11/Bandsalat.png' /></p>"; ?> } else { // & c.} ?></h1>
<div id="postmeta"><ul>
</ul></div><!-- End Postmeta -->
<div id="main">
<?php while ( have_posts() ) : the_post() ?><div <?php post_class( 'blogitem'); ?> id="post-<?php the_ID(); ?>"><p><a href="<?php the_permalink(); ?>"><?php the_post_thumbnail('home-thumb', array('class' => 'blogimage')); ?></a></p><h3 class="itemintro"><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h3><p class="meta"><?php the_time('F j, Y') ?> - <a href="<?php the_permalink(); ?>#comments"><?php comments_number( '' . __('No Comments', 'themefurnace') . '', '' . __('One Comment', 'themefurnace') . '', '' . __('% Comments', 'themefurnace') . '' ); ?></a></p><?php the_excerpt(); ?><p><a href="<?php the_permalink(); ?>" class="button green more">Full Story »</a></p></div><?php endwhile; ?>
<?php wp_reset_query(); ?>
<?php themefurnace_pagination(); ?></div><!-- End Main --><?php get_sidebar(); ?><br class="clear" />
<?php get_footer(); ?>
Alles anzeigen