• I can make APL show the date of the last post. However, I want it to show the last date of any post or page that was modified, even if the last modified page is an old one. How can I accomplish this?

Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Author EkoJR

    (@ekojr)

    There’s a [post_modified] shortcode.

    Thread Starter Carlo

    (@ccozzi)

    Yes, I know. That is exactly what I am using. My question was how to make that shortcode show updates for pages and not only posts.

    Plugin Author EkoJR

    (@ekojr)

    Everything appears to be working on my end.

    Correct me if I’m wrong, but it seems the confusing is from the shortcode name “Post” Modified, when you are expecting [page_modified]. In WP, Pages and Posts both use the WP_Post object, and the only thing that really separates the two is the hierarchical setting.

    So the shortcode will work for both Pages as it does for Posts. I had given it some thought at the time of development to toss the “post_”, but I ended up keeping it as a prefix index for the WP_Post Object to distinguish it from the other Objects (Ex. WP_Users).

    Plugin Author EkoJR

    (@ekojr)

    If you are still unable to use the shortcode, then reply back letting me know because everything should be in working order. Otherwise, this could potentially be a bug you have.

    Thread Starter Carlo

    (@ccozzi)

    A, then here it is:

    I use this shortcode: [post_modified format=”d F Y”]. It should display the latest date at which a page or post was modified. However, it shows only the date for the last POST modified. Of any PAGE that was modified after any POST, the date is not shown.

    I want to use this code to show the latest global mutation-date on the site; a page-edit or a new or edited post.

    Thanks in advance for any effort you are putting into this. I love the plugin… ?? It’s very useful.

    Plugin Author EkoJR

    (@ekojr)

    Sorry for the late reply. It seems as though I didn’t get a notification from WP.

    So to clarify. You are trying to show the last date in general. Either new and modified (which ever comes last).

    Off the top of my head, I don’t believe a concept of your idea was implemented. Most of APL tries to preserve most of the data as raw data. When adding the Post_Modified shortcode, I would of thought WordPress had the variable for the modified date to be a mixture of publish date as well; if no modified date is found.

    Regardless, APL can still accomplish the results you are looking for, but will take a bit more work. You may have noticed the PHP Function Shortcode for making custom shortcodes. With that, it’s possible to check if there is a modified date in WP_Post objects, and if not, then you would display the published date.

    It takes a bit of knowledge in PHP and creating a child theme to store the code in. Eventually I plan on publishing a database of different PHP Functions that could be used with APL, but lately I’ve had a lot to do.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘How to show update date for PAGES’ is closed to new replies.