Home>Support>North Theme: How to Add Last Modified Date on Posts?

North Theme: How to Add Last Modified Date on Posts?

Hello,

I would like to know how to add the last modified date on post only in North theme. I have researched plugins (which I do not trust installing being that they haven’t been updated, many in years). I have also researched various articles and code on the web, but wound up having Last Updated appear on pages too, and no reply when I try to contact the publisher of the code. So there’s gotta be a way to do this without all these headaches. I just want to know how to display the ‘Lat Updated’ date on my post only. That’s it.

This is our free support forum. Replies can take several days. If you need fast email support, please purchase a SiteOrigin Premium license.

  1. 6 years, 4 months ago Multimastery

    Hello, can you please show me how to do this? Thank you.

  2. 6 years, 4 months ago Multimastery

    Actually, I found this thread Thread: Last Date Post Modified and tried it on a test site and it worked. I just want last updated to appear only, so I edited functions.php and deleted this line:

    $time_string = '<time class="entry-date published" datetime="%1$s">%2$s</time>,

    Please confirm that the above thread and directions are still reliable, thanks!

  3. 6 years, 4 months ago Multimastery

    P.S. I already have a child theme installed on the real site I want to do this on, so does that mean I can just copy some files over or would I still need to install that new child theme?

  4. 6 years, 4 months ago Alex S
    Hi, I Work Here

    Hi Multimastery,

    That thread is correct and the directions are still valid.

    It depends on how your child theme is currently set up. You may be better off copying the entire siteorigin_north_post_meta function in the functions.php from the provided child theme as if you’ve made other adjustments to your functions.php, they’ll be lost if you replace it with the functions.php with child theme from the other thread.

  5. 6 years, 4 months ago Multimastery

    Hi Alex,

    Well I tried copying all the code over to my child theme (started from function siteorigin_north_post_meta) and it still although it shows last updated, when I tested updating a post it’s still showing old date not updated date. Tested several times.

    P.S. I even tried copying all the code starting from

    <?php
    
    /**
     * Enqueue the parent theme stylesheet.

    But then that messed up my entire site layout, so I deleted it.

  6. 6 years, 4 months ago Alex S
    Hi, I Work Here

    Hi Multimastery,

    Is the modified date day the same as the post date day (as in, are you modifying the post on the same day it was posted)? If so, it’ll use the post date.

    Unfortunately, we cannot directly assist with debugging this issue too much (as it’s outside of the scope of traditional support) so I would consider moving your code to the provided child theme as that one will work.

  7. 6 years, 4 months ago Multimastery

    No, the modified date is not on the same day as the published date, but it’s showing updated as the publish date.

    And if as a last resort I have to move my code to the provided child theme, will it mess up my current site look and layout? And if so, could I easily just switch back to my original child theme?

  8. 6 years, 4 months ago Multimastery

    Update: For anyone else who may be wondering if this works, well good news!… switching over to the recommended child theme above went smoothly and did not break my site. And If worst comes to worst you can always reactivate your previous theme/child theme. However, as an added precaution I would always recommend backing up your site before making and major moves or changes such as this

    Thanks again Alex for your confirmation and assistance!

Replies on this thread are closed. Please create a new thread if you have a question, or purchase a SiteOrigin Premium license if you need one-on-one email support.

Get The Most Out of SiteOrigin with SiteOrigin Premium

Find Out More