1000 Dank : )
Beiträge von re:bug
-
-
Auf jeden Fall erstmal schonmal riesengroßen Dank !!!
-
besser aber immernoch nicht richtig:
http://multikulti.moabit-macht-mobil.dees wird trotzdem nur ein hover verwendet und die posts brechen alle um.
das css hab ich ganz brav eingetragen.HTML.category-5 .article:hover { background-color: #FF0000; } .category-6 .article:hover { background-color: #FFB200; } .category-7 .article:hover { background-color: #48d1CC; }???
-
hier mal mein kompletter index:
PHP
Alles anzeigen<?php get_header(); ?> <ul class="mcol"> <?php if(have_posts()) : ?><?php while(have_posts()) : the_post(); ?> <?php if (in_category('5')) { echo('<div class="category-5">'); } else if(in_category('6')) { echo('<div class="category-6">'); } else if(in_category('7')) { echo('<div class="category-7">'); } ?> <li class="article"> <?php if ( has_post_thumbnail() ) { ?> <?php $imgsrcparam = array( 'alt' => trim(strip_tags( $post->post_excerpt )), 'title' => trim(strip_tags( $post->post_title )), ); $thumbID = get_the_post_thumbnail( $post->ID, 'background', $imgsrcparam ); ?> <div><a href="<?php the_permalink() ?>" class="preview"><?php echo "$thumbID"; ?></a></div> <?php } ?> <h2><a href="<?php the_permalink(); ?>" title="<?php the_title(); ?>"><?php the_title(); ?></a></h2> <?php the_excerpt(); ?> <div class="postmetadata"> Posted: <?php the_time(__('F jS, Y', 'kubrick')) ?> ˑ <?php comments_popup_link(__('No Comments'), __('1 Comment'), __('% Comments'), '', __('Comments Closed') ); ?><br /> <?php printf(__('Filled under: %s'), get_the_category_list(', ')); ?> </div> </li> <?php endwhile; ?> <?php else : ?> <?php endif; ?> </div> </ul> <?php if(have_posts()) : ?><?php while(have_posts()) : the_post(); ?> <?php endwhile; ?> <?php else : ?> <div id="main"> <h1><?php _e("Sorry, but you are looking for something that isn’t here."); ?></h1> </div> <?php endif; ?> <?php if(have_posts()) : ?><?php while(have_posts()) : the_post(); ?> <?php endwhile; ?> <div id="nav"> <div id="navleft"><?php next_posts_link(__('Previous page ')) ?></div> <div id="navright"><?php previous_posts_link(__('Next page ')) ?></div> </div> <?php else : ?> <?php endif; ?> <?php get_footer(); ?>übrigens besten dank für deine geduld und hilfe : )
-
aarghhh !
Parse error: syntax error, unexpected '{' in /var/www/web178/html/mmm/multikultispiele/wp-content/themes/paragrams/index.php on line 12
-
tut mir leid ich habe es anscheinend schlecht formuliert.
die posts auf der startseite (!!!) sollen je nach kategorie in der sie gespeichert sind eine andere hoverfarbe haben.d.h. ich möchte auf einer seite verschieden background hovers haben ... ?!?
-
danke für die hilfe !!!
aber leider klappt es immer noch nicht : ( -
schade ! klappt leider auch nicht : )
im original css heisst es:
.li_container .article:hover {
background-color:#fcdd79;
} -
sorry missverständnis !
ich meinte den hintergrund hinter den posts !!! -
-
Klappt nicht : (
Also es geht um die Startseite auf der natürlich Posts verschiedener Kategorien erscheinen und nicht um eine Seite mit nur einer Kategorie.
-
Sorry ! Das checke ich nicht ...
Hab ja versucht es über CSS zu regeln.ZitatKannst du mir evtl. noch etwas genauer sagen, wie und wo ich das definieren kann ?
-
Hallo,
In dem von mir verwendetem Theme (http://wpshower.com/themes/paragrams/) wird bei MouseOver jeweils Background Hover erzeugt.
Wie kann ich diesem je nach Kategorie eine andere Farbe zuweisen ?Ich habe es damit im Loop probiert:
PHP<?php if (in_category('5')) {echo ".li_container .article:hover { background-color:#000000; }";}; ?>
Hat aber nicht funktioniert ! : )Der Original Loop sieht so aus:
PHP
Alles anzeigen<?php if(have_posts()) : ?><?php while(have_posts()) : the_post(); ?> <li class="article"> <?php if ( has_post_thumbnail() ) { ?> <?php $imgsrcparam = array( 'alt' => trim(strip_tags( $post->post_excerpt )), 'title' => trim(strip_tags( $post->post_title )), ); $thumbID = get_the_post_thumbnail( $post->ID, 'background', $imgsrcparam ); ?> <div><a href="<?php the_permalink() ?>" class="preview"><?php echo "$thumbID"; ?></a></div> <?php } ?> <h2><a href="<?php the_permalink(); ?>" title="<?php the_title(); ?>"><?php the_title(); ?></a></h2> <?php the_excerpt(); ?> <div class="postmetadata"> Posted: <?php the_time(__('F jS, Y', 'kubrick')) ?> ˑ <?php comments_popup_link(__('No Comments'), __('1 Comment'), __('% Comments'), '', __('Comments Closed') ); ?><br /> <?php printf(__('Filled under: %s'), get_the_category_list(', ')); ?> </div> </li> <?php endwhile; ?> <?php else : ?> <?php endif; ?> </ul> <?php if(have_posts()) : ?><?php while(have_posts()) : the_post(); ?> <?php endwhile; ?> <?php else : ?> <div id="main"> <h1><?php _e("Sorry, but you are looking for something that isn’t here."); ?></h1> </div> <?php endif; ?>Danke für die Hilfe !