Support » Fixing WordPress » Modified Date + Time on Custom Post Type Archives?

  • Resolved Klaas Koopman


    Dear WordPress Specialists,

    I’m currently working on a website that has a few custom post types (with their respective archives).

    I’m using this code in the top of the footer.php:

    <?php the_modified_time(‘j F Y’); ?>, <?php the_modified_time(‘H:i’); ?>

    But somehow it doesn’t adjust the date or time for custom post type archives? It does for custom post types, posts and pages.

    Can someone help me explain how I can make this work for custom post type archives?

    • This topic was modified 2 months, 3 weeks ago by t-p. Reason: Moved to Fixing WordPress. This is not a Developing with WordPress topic
Viewing 3 replies - 1 through 3 (of 3 total)
  • The archive page is just a list of posts, dynamically assembled. It doesn’t have its own time or date. The function that you are using is for showing the current post’s date and time, so that doesn’t make sense in the footer of an archive page.

    @joyously thank you for your reply, that makes a lot of sense! Have a great day!

    buenas tardes me podrian ayudar pra acambiar la fecha y hora, o directamente desactivarla

Viewing 3 replies - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.