Trusted WordPress tutorials, when you need them most.
Beginner’s Guide to WordPress
WPB Cup
25 Million+
Websites using our plugins
16+
Years of WordPress experience
3000+
WordPress tutorials
by experts

WordPress’te Yazılarınızın Son Güncellenme Tarihini Gösterme

On yılı aşkın bir süredir WordPress siteleri işletiyoruz ve her zaman önerdiğimiz bir özellik, bir gönderinin en son ne zaman güncellendiğini göstermektir. Bu, büyük fark yaratan küçük bir ayrıntıdır.

Bu nedenle WPBeginner’da tüm yazılarımızda son güncellenme tarihini gösteriyoruz. Bu, okuyuculara içeriğimizin taze, doğru ve güvenilir olduğunu gösterir.

Birçok site sahibinin fark etmediği şey, bunun SEO’ya da yardımcı olabileceğidir. Arama motorları düzenli olarak güncellenen içerikleri tercih eder.

Ziyaretçiler gönderilerinizin güncel olduğunu gördüklerinde, sitenizde kalma ve söylediklerinize güvenme olasılıkları daha yüksektir.

Bu kılavuzda, WordPress’te yazıların son güncellenme tarihini görüntülemenin birden fazla yolunu göstereceğiz.

How to Display the Last Updated Date of Your Posts in WordPress

WordPress’te Yazılarınızın Son Güncellenme Tarihi Neden Görüntülenir?

Ziyaretçiler WordPress blogunuzdaki bir yazıyı veya sayfayı görüntülediğinde, WordPress temanız yazının yayınlandığı tarihi gösterecektir. Bu, çoğu blog ve statik web sitesi için uygundur.

Ancak WordPress, eski makalelerin düzenli olarak güncellendiği web siteleri tarafından da kullanılır. Bu yayınlarda, yazının en son değiştirildiği tarih ve saati görüntülemek önemlidir.

Örneğin, WPBeginner’da eğitimlerimizi düzenli olarak güncelliyor ve her gönderide ‘son güncellenme’ tarihini gösteriyoruz. Yalnızca yayınlanma tarihini gösterseydik, okuyucularımız bilgilerin güncel olmadığını varsayarak gönderiyi atlayacaktı.

Last Updated in WPBeginner

Bir başka örnek de haber web siteleridir. Yeni gelişmeleri göstermek, düzeltmeler eklemek veya medya dosyaları eklemek için sık sık eski hikayeleri güncellerler. Yalnızca yayınlanma tarihini gösterselerdi, kullanıcıları bu güncellemeleri kaçırabilirdi.

Ayrıca, Google ve diğer arama motorları en güncel bilgileri sıralamayı sever. Güncellenme tarihinizi görüntülemek, Googlebot’un ve diğerlerinin gönderiye en son ne zaman dokunulduğunu bilmesine yardımcı olur.

WordPress’te Yazılarınızın Son Güncellenme Tarihini Gösterme

Bu eğitim WordPress dosyalarınıza kod eklemenizi gerektirmektedir. Bunu daha önce yapmadıysanız, WordPress’te kod kopyalama ve yapıştırma hakkındaki kılavuzumuza göz atmanızı öneririz.

Bunu akılda tutarak, WordPress’te yazılarınızın son güncellenme tarihini kolayca görüntülemeniz için size 2 yöntem göstereceğiz. Tercih ettiğiniz yöntemi kullanmak için devam edebilir ve aşağıdaki atlama bağlantılarına tıklayabilirsiniz.

Hadi başlayalım!

Yöntem 1: Gönderi İçeriğinden Önce Son Güncelleme Tarihini Gösterme

Web sitenize özel kod ekleyerek içeriğinizden önce son güncellenme tarihini kolayca gösterebilirsiniz. Ancak koddaki en küçük bir hata bile sitenizi erişilemez hale getirebilir.

Bu yüzden WPCode kullanmanızı öneriyoruz. Kapsamlı bir şekilde test ettik ve özel kod eklemenin en güvenli ve en kolay yolu olduğunu gördük.

Deneyimlerimiz hakkında daha fazla bilgi edinmek için WPCode incelememize göz atın.

Öncelikle, ücretsiz WPCode eklentisini yüklemeniz ve etkinleştirmeniz gerekecektir. Daha fazla bilgi için, bir WordPress eklentisinin nasıl kurulacağına ilişkin adım adım kılavuzumuza bakın.

WPCode's homepage

Not: WPCode premium sürümü daha fazla özelliğe sahiptir! Yani, ücretsiz sürümü beğendiyseniz, yükseltebilir ve özel bulut kitaplığının, dönüşüm piksel eklentisinin, yerleşik erişim kontrollerinin ve çoklu site desteğinin keyfini çıkarabilirsiniz. Eklenti hakkında daha fazla bilgi edinmek için eksiksiz WPCode incelememize göz atabilirsiniz.

Eklenti etkinleştirildikten sonra, WordPress kontrol panelinizde Code Snippets ” + Add Snippet bölümüne gidin. ‘Son güncellenme tarihi’ni arayın ve farenizi ‘Son Güncellenme Tarihini Göster’ başlıklı sonucun üzerine getirin.

Kod, bir gönderinin yayınlanma tarihi ile son değiştirilme tarihlerinin farklı olup olmadığını kontrol eder. Eğer öyleyse, gönderi içeriğinden önce son değiştirilme tarihini görüntüler. (WPBeginner’da bu şekilde yapıyoruz.)

Ardından, ‘Snippet Kullan’ düğmesine tıklayabilirsiniz.

WPCode searching for a snippet by name

Ardından, ‘Snippet Düzenle’ ekranını göreceksiniz. WPCode, snippet’i sizin için zaten yapılandırmıştır.

Tek yapmanız gereken anahtarı ‘Aktif’ olarak değiştirmek ve hazır olduğunuzda ‘Güncelle’ye tıklamaktır.

WPCode edit snippet page and activate code

Kod parçacığı, sitenizin gövde metni stillerini kullanarak güncellenen tarihi göstereceğinden, son güncellenen tarihin görünümünü şekillendirmek için özel CSS ekleyebilirsiniz.

İşte başlangıç noktası olarak kullanabileceğiniz küçük bir CSS parçacığı:

.last-updated {
    font-size: small;
    text-transform: uppercase;
    background-color: #fffdd4;
} 

Ve demo WordPress web sitemizde bu şekilde görünüyor:

Last updated example on a live website

Ayrıca, ileri düzey bir kullanıcıysanız ve bunu yapmakta kendinizi rahat hissediyorsanız, temanızın functions.php dosyasına aşağıdakileri ekleyebilirsiniz.

Web sitenize FTP veya WordPress barındırma dosya yöneticiniz aracılığıyla bağlanın ve dosyayı sitenizin /wp-content/themes/yourthemename/ klasöründe bulun.

$u_time          = get_the_time( 'U' );
$u_modified_time = get_the_modified_time( 'U' );
// Only display modified date if 24hrs have passed since the post was published.
if ( $u_modified_time >= $u_time + 86400 ) {

	$updated_date = get_the_modified_time( 'F jS, Y' );
	$updated_time = get_the_modified_time( 'h:i a' );

	$updated = '<p class="last-updated">';

	$updated .= sprintf(
	// Translators: Placeholders get replaced with the date and time when the post was modified.
		esc_html__( 'Last updated on %1$s at %2$s' ),
		$updated_date,
		$updated_time
	);
	$updated .= '</p>';

	echo wp_kses_post( $updated );
}

Yöntem 2: Tema Şablonlarına Son Güncelleme Tarihi Ekleme

Güncellenen tarihi, yayınlanan tarihin yerine veya hemen altında da görüntüleyebilirsiniz.

Bu yöntem, belirli WordPress tema dosyalarını düzenlemenizi gerektirir. Düzenlemeniz gereken dosyalar temanıza bağlı olacaktır.

Birçok WordPress teması tarih ve saat gibi gönderi meta verilerini göstermek için kendi şablon etiketlerini kullanır. Diğer temalar içerik şablonlarını veya şablon parçalarını kullanır. Daha basit temalar içerik ve meta bilgilerini göstermek için single.php, archive.php ve diğer şablon dosyalarını kullanacaktır.

Tarih ve saati görüntülemekten sorumlu kodu içeren dosyayı aramanız gerekir. Ardından, bu kodu aşağıdaki kodla değiştirebilir veya temanızın tarih ve saat kodundan hemen sonra ekleyebilirsiniz.

$u_time = get_the_time('U'); 
$u_modified_time = get_the_modified_time('U'); 
if ($u_modified_time >= $u_time + 86400) { 
echo "<p>Last modified on "; 
the_modified_time('F jS, Y'); 
echo " at "; 
the_modified_time(); 
echo "</p> "; } 

Gönderinin güncellendiği zamanı görüntülemek istemiyorsanız, devam edin ve 6. ve 7. satırları silin.

Demo sitemizde bu şekilde görünüyordu. Twenty Twenty-One teması ile kod parçacığını inc klasörünün içindeki template-tags.php dosyasına ekledik.

Preview of Displaying Update Date by Editing Template

Bonus İpucu: Gönderilerinizin Son Güncellenme Tarihini Yönetme

Artık her gönderi için son güncelleme tarihini eklediğimize göre, herhangi bir gönderide her değişiklik yaptığınızda otomatik olarak güncellenecektir. Peki ya bir yazım hatasını düzeltmek veya bir etiket eklemek gibi tam bir güncelleme yerine yalnızca küçük bir düzeltme yapıyorsanız?

Küçük değişiklikler için, SEO açısından değiştirilme tarihini değiştirmeden bırakmak genellikle en iyisidir. Okuyucularınız daha sonra gönderide son büyük güncellemenin yapıldığı tarihi görecektir.

All in One SEO olarak da bilinenAIOSEO, piyasadaki en iyi WordPress SEO eklentisidir. Karmaşık jargon öğrenmeden arama sıralamalarını iyileştirmenize yardımcı olur, böylece web sitenizin trafiğini artırabilirsiniz.

AIOSEO's homepage

Arama motoru sıralamalarınızı iyileştirmek için zaten AIOSEO kullanıyorsanız, gönderilerinizin değiştirilme tarihini yönetmek için de kullanabilirsiniz.

Henüz kurmadıysanız, burada yapmanız gereken ilk şey AIOSEO‘yu kurmak ve etkinleştirmektir. WordPress için All in One SEO’nun doğru şekilde nasıl kurulacağına ilişkin kılavuzumuzda daha fazla bilgi edinebilirsiniz.

Not: Bu görevi yapmak için AIOSEO ücretsiz sürümünü kullanabilirsiniz. Ancak, profesyonel sürümü satın alarak ChatGPT AI araçları, içerik bozulma takibi, yeniden yönlendirme yöneticisi ve dahili bağlantı asistanı gibi gelişmiş özelliklere erişebileceksiniz. Daha fazla bilgi için AIOSEO incelememizin tamamını okuyabilirsiniz.

Etkinleştirmenin ardından, gönderileri düzenlerken ‘Değiştirme tarihini güncelleme’ etiketli yeni bir onay kutusu bulacaksınız. Bir gönderide küçük değişiklikler yaparken kutuyu işaretleyebilirsiniz.

Checkbox Added by AIOSEO

Bu, yazım hatalarını veya basit hataları düzeltirken kullanışlıdır ve okuyucularınızın ve arama motorlarının bilmesini istediğiniz değişiklikler yaparken kutunun işaretini kaldırabilirsiniz.

Video Eğitimi

Görsel bir rehbere mi ihtiyacınız var? O halde, WPCode içeren hızlı video eğitimimiz hoşunuza gidebilir:

Subscribe to WPBeginner

Umarız bu eğitim WordPress’te yazılarınızın son güncellenme tarihini nasıl görüntüleyeceğinizi öğrenmenize yardımcı olmuştur. Ayrıca WordPress web sitenizde Google Fonts’u nasıl devre dışı bırakacağınızı ve göz atmanız gereken mükemmel WordPress web sitesi örnekleri listemizi de öğrenmek isteyebilirsiniz.

If you liked this article, then please subscribe to our YouTube Channel for WordPress video tutorials. You can also find us on Twitter and Facebook.

Disclosure: Our content is reader-supported. This means if you click on some of our links, then we may earn a commission. See how WPBeginner is funded, why it matters, and how you can support us. Here's our editorial process.

The Ultimate WordPress Toolkit

Get FREE access to our toolkit - a collection of WordPress related products and resources that every professional should have!

Reader Interactions

146 yorumLeave a Reply

  1. How do you get Bing to pull the updated date as opposed to the original published date? I have it set up so that Google does, but Bing doesn’t seem to want to

    • If you just recently added this then you would need to give Bing time to recrawl your site’s content.

      Admin

    • That is better used within the WordPress loop if you want to use it, we recommend the second method in this guide if you wanted something similar.

      Admin

  2. Hey, I am using WordPress Twenty Twenty-Three Theme I have used the above code which you provide in my Function.php Now the latest update date showing on all posts, I was waiting for Google crawling, and after Google crawled the data showed the Published date instead of Updated date.

    How to get an Updated date on my Google Rich Snippet Please help I am very Thank full to you! :)

    Thank You So Much!

    • If you remove the published date from your posts that can help have Google show the updated date instead but there is not a guarantee of the date that Google will show as Google determines which one it decides to show.

      Admin

  3. I tried this but it shows both original published date and last updated date.
    I want to show
    if the post is update- show updated date
    if not
    just show original date.
    How to do this.

    • For what you’re wanting you would want to add an else statement that had your theme’s original option to display the date using the method to edit your theme template from this article. An example of what you would add is the code below:


      else {
      // Theme's code
      }

      Admin

  4. The code to insert into a theme file worked perfectly! I added it as a function in my functions.php file, and called it on the page. The allows me to update the code in 1 place, and it will update across my site, in case I want to show the last modified date for multiple post types or in custom templates. Thank you!

  5. I have a question, for example, if I now display the date of the last update of the article and I have 800 articles and all the dates have changed for all articles at once, will this affect or harm the search engines

    • It should not cause an issue, you would mainly need to give time for Google to recrawl your updated dates.

      Admin

  6. Thank you so much for this tutorial!
    I used the first method and it perfectly works for me but I am having one issue, the post is still showing the published date on google search instead of the latest update date.
    How can I do away with this?

    • It would depend on how recently it has changed, if you just added the updated date you would need to wait for Google to recrawl your post.

      Admin

  7. Hello, this was a very helpful blog and video. But when I apply, it shows the end of the content. please tell me the solution

    • You may need to check with the support for your specific theme to check the placement of your code in case your theme has a different method for displaying the publish date.

      Admin

  8. Just a quick question, the updated date shows at the bottom of my posts, as opposed to the top.

    Is there a solution to ensure the new updated date is at the beginning of the posts?

    • It would depend on how your theme is designed. If you reach out to your theme’s support they should be able to help you place it in the correct location :)

      Admin

  9. Hi Team,

    I am able to print updated date but it’s getting rendered below the featured image, can you advise how can print the udpated date on the top of the featured image, means right below the title.

    • You would want to reach out to the support for your specific theme and they should be able to assist with that placement.

      Admin

  10. Hello,

    I want to show only post update date on page and in search results instead of publish date. How can I achieve that? I have tried everything.

    • If you are unable to remove the published date then we would recommend reaching out to your specific theme’s support and they would be able to help you remove that.

      Admin

    • If the change is recent, you would need to wait for Google’s cache to clear. Otherwise, you would want to check with your theme’s support to ensure they are not setting the specific publish date elsewhere

      Admin

  11. What if I want to show only the updated date & not the published date? The method shown here displays both published & updated date, I don’t want that, just updated date, that’s it.

    • It would depend on your theme but you would use method 2 to replace the display of the last edited date. The location of that code varies from theme to theme.

      Admin

  12. The PHP code worked great, but how do I limit it to post pages only. Once I added the code to functions.php it displayed last updated on both pages and posts. What do I need to add to limit it to just posts?

    Thanks,

    John

    • To limit it to posts you would use an if statement after the function:

      function wpb_last_updated_date( $content ) {
      if ( is_single() ) {

      and add a closing } above the add_filter line

      Admin

      • Thank you for the quick response!

        I tried the code, but it prevents my blog pages from rendering. However, my blog post pages continue to work and display last updated date.

        Do you have any idea why that is?

        • You may want to reach out to your theme’s support, this code shouldn’t prevent the rendering of content unless something theme-specific is conflicting with it.

  13. Still worked in September 2019 for one of my sites. For my Genesis based site, I needed to use the Genesis Simple Edits plugin to easily modify the post info since they put the post info in an array, instead of in a function.

  14. Hi there,

    I’m having the opposite problem – I have a new website and have backdated my posts to the date that they were originally created, but my site is showing the dates that they were last updated.

    Any advice on how to fix this, or if there is a link to another tutorial for that somewhere would be greatly appreciated, I can’t find one!

    Thanks.

    • By default, WordPress should work like this, you may want to reach out to the support for the specific theme you’re using to see if they have a setting for this.

      Admin

    • Unless I hear otherwise, we haven’t tested the SEO impact of having both displaying at the same time but your post’s metadata should let search engines know which date to look at.

      Admin

  15. Thanks.. is there a way to show the Last modified field Only After certain time from date of post?
    i.e if the next day you edited a post for some reason, doesn’t have to show as modified..

  16. i have a page that lists books that I have read and I update the page when I start a new book.

    On the sit’s homepage I have a menu link to the book list. I would like to have button, or maybe just text, next to the homepage link showing the last time the book list page has been updated.

    Any suggestions?

    Thanks.

    • You could either add a text widget or edit the menu item’s title manually when you update the page.

      Admin

  17. I am using Method 1 since Method 2 doesnt seem to work on my theme. Is there a way to have the text be displayed n the bottom of the post? Your response would mean a lot. Thank you

    • For relocating the publish date you would want to reach out to the support for the theme you are currently using for how to do that with your theme.

      Admin

  18. This is great. Quick question, I can’t seem to get it to only show on post and not pages? I tried to add method 2 to the single post template, but that didnt seem to work. It doesnt contain a bit about date or time. Even though the date is displayed in header.
    Should i be adding more to show date and time in the single post template?

    • Your specific theme may be pulling that information from another file. If you reach out to your specific theme’s support they should be able to assist.

      Admin

  19. Hi, thanks so much for this guidance freely given.

    Suppose I do not want to show the published date but only the last updated date? How can I modify the code to achieve that, please?

    Thanks
    Alexander

    • You would need to modify your theme’s templates, as each theme is different you would need to check with your theme’s support for where the published date is located

      Admin

  20. Hi,

    I found your information helpful. But perhaps you can answer two more questions:

    When is it best to completely update a post aka republish it versus just provide the “last updated” information? Sometimes republishing something feels like cheating – it’s a lazy way to update my blog.

    I’ve also read that having two dates on a post can confuse Google when it is crawling your site. Of course, I would like for them to pick up the latest date so it shows next to the description in the search results. Is there a way to show one or the other?

    Right now, I have removed the entry date on posts while employing the “last updated” date (using css for both). Problem is that if I haven’t updated something, then it shows no date which is also a no-no according to the post above.

    A LOT to address here, I know! But if you would be so kind to consider a reply, I would appreciate it.

    Thanks!

    • Hi Melanie,

      It is best to simply update a post if changes are minor. However, if a post is completely outdated and a rewrite contains all new information, then you can publish it as a new article and redirect your old article.

      Admin

  21. How do you keep the “last updated” from appearing at the top of specific pages. I really only want it on blog posts, not my homepage, contact page, etc.? thanks.

  22. This code is excellent. Thanks so much. I’m following pretty much all of it, but I’m just curious what the 86400 number added to the updated time is doing.

    Thanks in advance.

  23. Thanks, this was helpful for implementing last updated text on my blog.

    One point, the theme specific code is actually incorrect. You forgot the “echo get_…” before the get_the_modified_time() function.

    Right now it just says:

    the_modified_time(‘F jS, Y’);
    echo ” at “;
    the_modified_time();

    When it should say:

    echo get_the_modified_time(‘F jS, Y’);
    echo ” at “;
    echo get_the_modified_time();

  24. Can you please tell me how to post the modified date AFTER the content. I tried using a in the footer.php but then it just displays before the content AND in the footer. I would just like the footer to display.

  25. Thanks guys, it works like a charm! A so so cool tip!

    If you want to add the last modified ONLY ON POSTS, that works for me (I’m Italian and I edited it not showing the hour and modified the date order):

    function wpb_last_updated_date( $content ) {
    $u_time = get_the_time(‘U’);
    $u_modified_time = get_the_modified_time(‘U’);
    if ($u_modified_time >= $u_time + 86400) {
    $updated_date = get_the_modified_time(‘d F Y’);
    $updated_time = get_the_modified_time(‘H:i’);
    $custom_content .= ‘Articolo aggiornato il ‘. $updated_date . ”;
    }
    if(is_single()){
    $custom_content .= $content;
    return $custom_content;
    }
    return $content;
    }
    add_filter( ‘the_content’, ‘wpb_last_updated_date’ );

  26. I have applied above all settings on my website and its working fine.

    But I have one question that when two dates shown above content then which date will be shown in google search engine result page? Please provide answer because I have done all this only for showing last update date in google search engine result page.

  27. Hi,
    Added the following code to functions.php

    function wpb_last_updated_date( $content ) {
    $u_time = get_the_time(‘U’);
    $u_modified_time = get_the_modified_time(‘U’);
    if ($u_modified_time >= $u_time + 86400) {
    $updated_date = get_the_modified_time(‘F jS, Y’);
    $updated_time = get_the_modified_time(‘h:i a’);
    $custom_content .= ‘Last updated on ‘. $updated_date . ‘ at ‘. $updated_time .”;
    }

    $custom_content .= $content;
    return $custom_content;
    }
    add_filter( ‘the_content’, ‘wpb_last_updated_date’ );

    Works fine for posts but … the same is displayed in Pages also.
    I want it only for post. or if pages then at a different place eg End og the page article.

    Best Wishes
    Vishal Mukherjee

  28. Thank you for the code.
    However, there is a common problem that Google pulls the date of the embedded youtube video instead of the updated blog post date. In your case, I see that the search results do in fact show the correct date, and not the embedded video’s upload date. How did you achieve this? Thank you.

  29. hello, I want only show updated date like your website, not both(updated and published date), when I add your code to site then its shows that both dates, please guide me to show only that updated date. thanks

  30. Thank you for this post, I tried it and it works like a charm. I went for the site-specific plugin-option.

  31. Thanks a lot it worked perfectly. but for the custom CSS only the “text-transform” worked on my theme. Other CSS like; color, text-weight, background-color etc. did not work. Please is there any possible way around it?

  32. hi syed ,am peter. the code work on my theme, but when i tried to add css style , i mean this code .last-updated {
    font-size: small;
    text-transform: uppercase;
    background-color: #fffdd4;
    }

    my site goes blank. please what do i do to restore my website…

  33. Thank you for this tip. I actually turned it into a shortcode so that it only shows up where I want it, and not on every page or post. [last_updated]

  34. Hi,
    Actually the code is work, but the result showing some numbers before “last update”

    1494555840LAST UPDATED ON JUL 9, 2017

    Every single post that I updated showing different numbers like that. Any one can help me?

    Thank you

  35. Hey I just tried this method it worked fine for me but the problem is that now my post is not showing any date in google search please help me i also want to show last updated date in Google search when anyone searches my content.

  36. Hi
    The code work great, thank you!
    Can you tell us how to edit published time and add Published by “author” like in your images?

Leave A Reply

Thanks for choosing to leave a comment. Please keep in mind that all comments are moderated according to our comment policy, and your email address will NOT be published. Please Do NOT use keywords in the name field. Let's have a personal and meaningful conversation.