Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> [PHP][HTML]archivum ...
krzysztofkif
post
Post #1





Grupa: Zarejestrowani
Postów: 14
Pomógł: 0
Dołączył: 24.01.2009

Ostrzeżenie: (0%)
-----


to jest kawałek kodu php ktury jest odpowiedzialny za archivum kategori a chciałybym ze te archivum kategori było przepisane do danej kategori oddzielnie czyli np kategoria a , kategoria b i tak dalej uzywam silnika wordpress exclamation.gif ! na wszelkie pytanie odpowiem exclamation.gif !
  1. <div class="sitenav">
  2.    <a href="<?php bloginfo('url'); ?>">Home</a>&nbsp;&nbsp;&raquo;&nbsp;&nbsp;Archives
  3.    </div>
  4.    
  5.    <?php if (have_posts()) : ?>
  6.  
  7.    <div class="post">
  8.    <?php $post = $posts[0]; // Hack. Set $post so that the_date() works. ?>
  9.    <?php /* If this is a category archive */ if (is_category()) { ?>
  10.    <h2>Archive for the ‘<?php single_cat_title(); ?>’ Category</h2>
  11.    <?php /* If this is a tag archive */ } elseif( is_tag() ) { ?>
  12.    <h2>Posts Tagged ‘<?php single_tag_title(); ?>’</h2>
  13.    <?php /* If this is a daily archive */ } elseif (is_day()) { ?>
  14.    <h2>Archive for <?php the_time('F jS, Y'); ?></h1>
  15.    <?php /* If this is a monthly archive */ } elseif (is_month()) { ?>
  16.    <h2>Archive for <?php the_time('F, Y'); ?></h2>
  17.    <?php /* If this is a yearly archive */ } elseif (is_year()) { ?>
  18.    <h2>Archive for <?php the_time('Y'); ?></h2>
  19.    <?php /* If this is an author archive */ } elseif (is_author()) { ?>
  20.    <h2>Author Archive</h2>
  21.    <?php /* If this is a paged archive */ } elseif (isset($_GET['paged']) && !empty($_GET['paged'])) { ?>
  22.    <h2>Blog Archives</h2>
  23.    <?php } ?>
  24.    </div>
  25.    
  26.    <!-- Plugin Navigation -->
  27.    <?php if(function_exists('wp_pagenavi')) { wp_pagenavi(); } ?><div class="clear"></div>
  28.    <!-- End -->
  29.    
  30.    <?php while (have_posts()) : the_post(); ?>
  31.  
  32.    <div id="post-<?php the_ID(); ?>" class="post archived">
  33.  
  34.    <h2><a href="<?php the_permalink(); ?>" rel="bookmark" title="<?php the_title(); ?>"><?php the_title(); ?></a></h2>
  35.    
  36.    <ul class="postinfo">
  37.    <li><?php the_time('l, F j, Y, G:i'); ?></li>
  38.    <li class="ncat"><?php the_category(', ') ?></li>
  39.    <?php if(function_exists('the_views')) { print '<li class="nview">'; the_views(); print '</li>'; } ?>
  40.    <li class="ncomment"><a href="<?php the_permalink(); ?>#respond"><?php comments_number('Add a comment','1 comment','% comments'); ?></a></li>
  41.    <?php edit_post_link('[Edit]', '<li>', '</li>'); ?>
  42.    </ul><div class="clear"></div>
  43.    
  44.    <div class="entry">
  45.    <div class="thumb"><?php show_thumb($width=120,$height=100,$crop='T',$quality=95,$blank=false); ?></div>
  46.    <?php the_excerpt_reloaded(65, '<a>', 'none', FALSE); ?>
  47.    <a href="<?php the_permalink(); ?>" class="fullstory">Full story</a><div class="clear"></div>
  48.    </div>
  49.    
  50.    <?php the_tags('<div class="tags">Tags: ', ', ', '</div>'); ?>
  51.    
  52.    </div><!-- post -->
  53.  
  54. <?php endwhile; ?>
  55.  
  56.    <!-- Plugin Navigation -->
  57.    <?php if(function_exists('wp_pagenavi')) { wp_pagenavi(); } ?><div class="clear"></div>
  58.    <!-- End -->
  59.  
  60. <?php else : ?>
  61.  
  62.    <!-- not found here -->
  63.    <?php include TEMPLATEPATH. '/templates/not.found.html'; ?>
  64.  
  65. <?php endif; ?>


Ten post edytował krzysztofkif 9.03.2009, 21:42:46
Go to the top of the page
+Quote Post
 
Start new topic
Odpowiedzi (1 - 2)
erix
post
Post #2





Grupa: Moderatorzy
Postów: 15 467
Pomógł: 1451
Dołączył: 25.04.2005
Skąd: Szczebrzeszyn/Rzeszów




I jaki masz problem? Nie ma pytania. tongue.gif

PS. Przeniosłem, bo dotyczy zapewne WordPressa. winksmiley.jpg


--------------------

ZCE :: Pisząc PW załączaj LINK DO TEMATU i TYLKO w sprawach moderacji :: jakiś błąd - a TREŚĆ BŁĘDU? :: nie ponaglaj z odpowiedzią via PW!
Go to the top of the page
+Quote Post
krzysztofkif
post
Post #3





Grupa: Zarejestrowani
Postów: 14
Pomógł: 0
Dołączył: 24.01.2009

Ostrzeżenie: (0%)
-----


zaraz dam pytanie bo cos mi tu sie mota ;/
Go to the top of the page
+Quote Post

Reply to this topicStart new topic
1 Użytkowników czyta ten temat (1 Gości i 0 Anonimowych użytkowników)
0 Zarejestrowanych:

 



RSS Aktualny czas: 20.08.2025 - 12:04