• Resolved itsjonesyy

    (@itsjonesyy)


    I have noticed pages generated by the plugin that have ‘time ago’ will not function on a site that is being cached. In single listings, category pages, all pages where ‘x days ago’, ‘x minutes ago’ is shown, the time will not update accurately if the page uses caching. I need to use caching on my site whilst having these times update accurately.

    Is there a simple solution for the time ago used by the plugin to work on a cached site or am I forced to not use caching so the time updates and shows correctly?

    It would help if the generated time ago used the <time> tag so I could use this jquery plugin https://timeago.yarp.com/ , but I do not know how you are generating the times.

    I’m sure many others want this to work with caching enabled, please advise

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author pluginsware

    (@pluginsware)

    Hi,

    Our current version uses WordPress’ built-in human_time_diff(), get_the_time() and the current_time() functions for the time display.

    I promise that our next version will use the <time> tag.

    As a quick solution, you can edit the following files and wrap the time display with a <time> tag, and use this jquery plugin https://timeago.yarp.com/

    /wp-content/plugins/advanced-classifieds-and-directory-pro/public/partials/listings/acadp-public-listings-list-display.php
    /wp-content/plugins/advanced-classifieds-and-directory-pro/public/partials/listings/acadp-public-listings-grid-display.php
    /wp-content/plugins/advanced-classifieds-and-directory-pro/public/partials/listings/acadp-public-listings-map-display.php
    /wp-content/plugins/advanced-classifieds-and-directory-pro/public/partials/listing/acadp-public-listing-display.php
    /wp-content/plugins/advanced-classifieds-and-directory-pro/public/partials/user/acadp-public-manage-listings-display.php

    Hope this helped you!

    Please feel free to contact us for further questions.

    Thanks

    Thread Starter itsjonesyy

    (@itsjonesyy)

    Thanks, that would be great if you could implement the time tag throughout the plugin so I can use caching alongside the jquery time-ago plugin. Looking forward to it.

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘‘Time-ago’ with caching?’ is closed to new replies.