wmaraci reklam
lidertakipci

yazarmfa yazarmfa WM Aracı Kullanıcı
  • Üyelik 17.01.2018
  • Yaş/Cinsiyet 25 / E
  • Meslek Yazar
  • Konum İstanbul Avrupa
  • Ad Soyad M** A**
  • Mesajlar 53
  • Beğeniler 4 / 11
  • Ticaret 0, (%0)
Merhaba, çok popüler olan tarihi "X önce yazıldı" şeklinde yapmak istiyorum. İnternette bir sürü bu konuyu anlatan site var fakat hepi aynı şeyi söylüyor. Ben yirmi on beş teması kullanıyorum. Yani Wordpress'in orjinal teması. Buda 3. taraf temaların standartlarından farklı oluyor. Çünkü tema kodlarını wordpress çekirdeğinden alıyor.

Sitelerde çoğunlukla single.php içinde tarihi gösteren kısmı


bunun ile değiştirin yazıyor.

Benim single.php dosyamın içeriği ise şu şekilde:

/**
* The template for displaying all single posts and attachments
*
* @package WordPress
* @subpackage Twenty_Fifteen
* @since Twenty Fifteen 1.0
*/

get_header(); ?>




// Start the loop.
while ( have_posts() ) :
the_post();

/*
* Include the post format-specific template for the content. If you want to
* use this in a child theme, then include a file called content-___.php
* (where ___ is the post format) and that will be used instead.
*/

get_template_part( 'content', get_post_format() );


// If comments are open or we have at least one comment, load up the comment template.
if ( comments_open() || get_comments_number() ) :
comments_template();
endif;

// Previous/next post navigation.
the_post_navigation(
array(
'next_text' => ' ' .
'' . __( 'Next post:', 'twentyfifteen' ) . ' ' .
'%title',
'prev_text' => ' ' .
'' . __( 'Previous post:', 'twentyfifteen' ) . ' ' .
'%title',
)
);

// End the loop.
endwhile;
?>








X önce yazıldı şekilde tarihi ayarlamam için neler yapmalıyım yardımcı olabilir misiniz? Çok lazım bana...
 

 

Site Ayarları
  • Tema Seçeneği
  • Site Sesleri
  • Bildirimler
  • Özel Mesaj Al