( Zaloguj | Zarejestruj )
Wszystkie tematy są moderowane. Przed ukazaniem się muszą być zaakceptowane przez Redakcję. Prosimy nie wysyłać wielokrotnie tego samego wpisu.
![]() ![]() |
01.7.2010 - 13:11
Post
#1
|
|
|
aktywność: ![]() Grupa: +Bloger Postów: 26 Nr: 8 463 |
Potrzebuję w motywie Motion dodać godzinę publikacji wpisu. Co należy po podmieniać, np. tutaj:
archiwe.php KOD <?php
/** * @package WordPress * @subpackage Motion */ get_header(); ?> <div id="main"> <div id="content"> <?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() ) { ?> <h2 id="contentdesc">Kategoria: <span><?php single_cat_title(); ?></span></h2> <?php /* If this is a tag archive */ } elseif ( is_tag() ) { ?> <h2 id="contentdesc">Tag Archiwum: <span><?php single_tag_title(); ?></span></h2> <?php /* If this is a daily archive */ } elseif ( is_day() ) { ?> <h2 id="contentdesc">Archiwum dla <span><?php the_time( 'F jS, Y' ); ?></span></h2> <?php /* If this is a monthly archive */ } elseif ( is_month() ) { ?> <h2 id="contentdesc">Archiwum dla <span><?php the_time( 'F, Y' ); ?></span></h2> <?php /* If this is a yearly archive */ } elseif ( is_year() ) { ?> <h2 id="contentdesc">Archiwum dla <span><?php the_time( 'Y' ); ?></span></h2> <?php /* If this is an author archive */ } elseif ( is_author() ) { ?> <h2 id="contentdesc">Archiwum autora</h2> <?php /* If this is a paged archive */ } elseif ( isset( $_GET['paged'] ) && !empty( $_GET['paged'] ) ) { ?> <h2 id="contentdesc">Archiwum Bloga</h2> <?php } ?><br/> <?php while ( have_posts() ) : the_post(); ?> <?php if ( function_exists( 'wp_list_comments' ) ) : ?> <div <?php post_class(); ?> id="post-<?php the_ID(); ?>"> <?php else : ?> <div class="post" id="post-<?php the_ID(); ?>"> <?php endif; ?> <div class="posttop"> <h2 class="posttitle"><a href="<?php the_permalink(); ?>" rel="bookmark" title="Permanent Link to <?php the_title_attribute(); ?>"><?php the_title(); ?></a></h2> <div class="postmetatop"> <div class="categs">Napisane w: <?php the_category( ', ' ); ?> przez <?php the_author() ?> — <?php comments_popup_link( __( 'Zostaw komentarz' ), __( '1 komentarz' ), __( '% komentarzy' ) ) ?></div> <div class="date"><span><?php the_time( get_option( 'date_format' ) ); ?></span></div> </div> </div> <div class="postcontent"> <?php the_content( 'Zobacz cały artykuł »' ); ?> </div> <div class="postmetabottom"> <div class="tags"><?php the_tags( 'Tagi: ', ', ', '' ); ?></div> <div class="readmore"> <span> <?php $moretag = strpos($post->post_content, '<!--more'); $postpaged = strpos($post->post_content, '<!--nextpage'); $next= ''; if (!$moretag && !$postpaged) $full = true; else { $full = false; if (!$moretag) $next = '2/'; else $next = '#more-'.$id; } if( $full == true && $post->comment_status == 'open' ) { ?> <a href="<?php the_permalink() ?>#comments" title="<?php printf(__('Komentowanie na %s'), the_title_attribute()); ?>"><?php _e('Komentarz'); ?> </a> <?php } elseif(!$full && $post->comment_status == 'open') { ?> <a href="<?php the_permalink(); echo $next; ?>" title="<?php printf(__('Kontynuuj czytanie %s i komentarzy'), the_title_attribute()); ?>"><?php _e('Czytaj dalej & komentuj'); ?></a> <?php } elseif(!$full && $post->comment_status == 'closed') { ?> <a href="<?php the_permalink(); echo $next; ?>" title="<?php _e('Kontynuuj czytanie'); the_title_attribute(); ?>"><?php _e('Czytaj Więcej'); ?></a> <?php } else { ?> <a href="<?php the_permalink() ?>" rel="bookmark" title="<?php printf(__('Permanentny Link do %s'), the_title_attribute()); ?>"><?php _e('Permalink'); ?> </a> <?php } ?> </span> </div> </div> </div><!-- /post --> <?php endwhile; ?> <?php else : ?> <div class="post"> <div class="posttop"> <h2 class="posttitle"><a href="#">Oops!</a></h2> </div> <div class="postcontent"> <p>Coś czego szukasz nie ma tutaj.</p> </div> </div><!-- /post --> <?php endif; ?> <div id="navigation"> <?php if ( function_exists( 'wp_pagenavi' ) ) : ?> <?php wp_pagenavi(); ?> <?php else : ?> <div class="alignleft"><?php next_posts_link( '« Starsze wpisy' ); ?></div> <div class="alignright"><?php previous_posts_link( 'Nowsze wpisy »' ); ?></div> <?php endif; ?> </div><!-- /navigation --> </div><!-- /content --> <?php get_sidebar(); ?> </div><!-- /main --> <?php get_footer(); ?> |
|
|
|
01.7.2010 - 15:11
Post
#2
|
|
![]() aktywność: ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Grupa: Redakcja Postów: 4 252 Nr: 5 919 |
KOD <?php the_time( get_option( 'date_format' ) ); ?> To Ci nie działa? To Spróbuj np. KOD <?php the_time('l, F jS, Y') ?> http://codex.wordpress.org/Formatting_Date_and_Time |
|
|
|
01.7.2010 - 16:34
Post
#3
|
|
|
aktywność: ![]() Grupa: +Bloger Postów: 26 Nr: 8 463 |
Pojawiała się tylko data, spróbuję Twojego.
Po Twoim pojawia się: CYTAT wtorek, Czerwiec 29th, 2010 Godziny nie ma... Przebudowałem na: KOD <?php the_time('l j F Y, H:i') ?> Jedynie chciałbym, aby było poprawnie odmienione. Ten post edytował OldShaterhan 01.7.2010 - 16:39 |
|
|
|
10.7.2010 - 21:00
Post
#4
|
|
|
aktywność: ![]() Grupa: +Bloger Postów: 26 Nr: 8 463 |
Ostatecznie użyłem:
KOD <?php the_time('l ') ?><?php the_time(get_option('date_format')); ?><?php the_time(', H:i') ?>
|
|
|
|
![]() ![]() |
| : 9 02 12 - 14:18 |