( Zaloguj | Zarejestruj )
![]() ![]() |
10.3.2010 - 23:55
Post
#1
|
|
|
aktywność: ![]() Grupa: +Bloger Postów: 36 Nr: 6 512 |
Witajcie,
znalazłem taki fajny szablon Duotone (można wyszukać go przez panel admin WP jak wiecie zapewne Problem dotyczy 1 rzeczy. Mianowicie, kiedy klikam na widżeta, aby wyświetlił wszystkie wpisy z danej kategorii, to pokazuje się strona, na której pokazują się kwadraciki. Każdy kwadracik to inny wpis. Klikając na kwadracik przechodzisz do treści wpisu. ![]() I pytanie: jak dodać, do takiego kwadracika własne zdjęcie dla każdego wpisu? Domyślam się, że to trzeba w pliku archive, ale nic mi nie wychodzi. oto kod tego pliku KOD <?php get_header(); rewind_posts(); ?>
<div class="archive"> <ul id="filters"> <li></li> <li> <?php wp_dropdown_categories('show_option_none=Wybierz kategorie'); ?> <script type="text/javascript"> /* <![CDATA[ */ var dropdown = document.getElementById("cat"); s function onCatChange() { if ( dropdown.options[dropdown.selectedIndex].value > 0 ) { location.href = "<?php echo get_option('home'); ?>/?cat="+dropdown.options[dropdown.selectedIndex].value; } } dropdown.onchange = onCatChange; /* ]]> */ </script> </li> </ul> <?php if (have_posts()) : ?> <?php $post = $posts[0]; // Hack. Set $post so that the_date() works. ?> <?php /* If this is a category archive */ if (is_category()) { ?> <br> <?php /* If this is a tag archive */ } elseif( is_tag() ) { ?> <h2>Posts Tagged ‘<?php single_tag_title(); ?>’</h2> <?php /* If this is a daily archive */ } elseif (is_day()) { ?> <h2>Archive for <?php the_time('F jS, Y'); ?></h2> <?php /* If this is a monthly archive */ } elseif (is_month()) { ?> <h2>Archive for <?php the_time('F, Y'); ?></h2> <?php /* If this is a yearly archive */ } elseif (is_year()) { ?> <h2>Archive for <?php the_time('Y'); ?></h2> <?php /* If this is an author archive */ } elseif (is_author()) { ?> <h2>Author Archive</h2> <?php /* If this is a paged archive */ } elseif (isset($_GET['paged']) && !empty($_GET['paged'])) { ?> <h2>Blog Archives</h2> <?php } ?> <div class="nav"> <div class="prev"><?php next_posts_link('« Older Entries') ?></div> <div class="next"><?php previous_posts_link('Newer Entries »') ?></div> </div> <ul class="thumbnails"> <?php while (have_posts()) : the_post(); ?> <li id="post-<?php the_ID(); ?>"> <a href="<?php the_permalink() ?>" title="<?php the_title_attribute(); ?>"><?php the_thumbnail(); ?></a> <?php endwhile; ?> </ul> <div class="nav"> <div class="prev"><?php next_posts_link('« Older Entries') ?></div> <div class="next"><?php previous_posts_link('Newer Entries »') ?></div> </div> <?php else : ?> <h2 class="center">Not Found</h2> <?php include (TEMPLATEPATH . '/searchform.php'); ?> <?php endif; ?> </div> <?php get_footer(); ?> |
|
|
|
11.3.2010 - 07:29
Post
#2
|
|
|
aktywność: ![]() ![]() ![]() ![]() Grupa: +Bloger Postów: 325 Nr: 5 727 |
Pola użytkownika
|
|
|
|
11.3.2010 - 08:12
Post
#3
|
|
|
aktywność: ![]() Grupa: +Bloger Postów: 36 Nr: 6 512 |
|
|
|
|
11.3.2010 - 08:23
Post
#4
|
|
|
aktywność: ![]() Grupa: +Bloger Postów: 36 Nr: 6 512 |
Prościej będzie tak - link do tego szablonu:
http://wordpress.org/extend/themes/downloa...otone.1.0.1.zip czy ktoś ma pomysł na wstawić w te małe kwadraciki własne fotosy? trzeba wybrać stronę, gdzie są wpisy z danej kategorii |
|
|
|
![]() ![]() |
| : 8 02 12 - 21:33 |