Support » Plugin: Ajax Search Lite » Change Date from Post to Modified

  • Resolved xclnt


    Hi,great plugin. I just wanted to ask,if there is a way to change date shown from Post date (which is default) to Modified date in search results.

    If you look at my page, and submit lets say 84624211,you get returned one post, where date is when was the post made,not when was it modified.

    Would that be somehow possible to achiev?

    The page I need help with: [log in to see the link]

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author wpdreams



    Well, there is no option for that on the back-end, but it might be possible via a custom code:

    Add this custom code to the functions.php in your theme/child theme directory. Before editing, please make sure to have a full site back-up just in case!

    add_filter('asl_results', 'asl_modified_date', 10, 1);
    function asl_modified_date($results) {
       foreach ($results as $k=>&$r) {
        $r->date = get_the_modified_date('', $r->id);
       return $results;

    Also, make sure that the dates are enabled on the plugin back-end. If everything goes well, this should change it to last modified.

    Ernest M.

    This. Is. Absolutely. AMAZING!

    Thank you so so much. This really saved my bacon.
    You are awesome.

    Keep it up!
    GRAPA Studio

    Plugin Author wpdreams


    Thank you for your kind words 🙂 You are welcome.

    I will mark this as resolved now. Feel free to rate the plugin, it is greatly appreciated.

    Ernest M.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Change Date from Post to Modified’ is closed to new replies.