Change date format

  • matteo.cattelan
    Participant
    10 months, 2 weeks ago #34957

    Hi,
    is possibile change the format of date in the list of results?

    Thanks a lot.

    wpsolr
    Keymaster
    10 months, 2 weeks ago #34959
    matteo.cattelan
    Participant
    10 months, 2 weeks ago #34961

    I am referring to the listing of the front end results, not the facets

    wpsolr
    Keymaster
    10 months, 2 weeks ago #34962

    WPSOLR does not display results, it queries the search engine then gives back the results to your theme’s post loop.

    matteo.cattelan
    Participant
    10 months, 2 weeks ago #34964

    WPSOLR shortcode have a fixed html with loop with results.
    There is a hook with set the date format?

    wpsolr
    Keymaster
    10 months, 2 weeks ago #34965

    The shortcode is deprecated, and must not be used but on a cross-domain search.

    On screen 2.1, select to display results with your own them’s template intead.

    matteo.cattelan
    Participant
    10 months, 2 weeks ago #34966

    I have to use the shortcode because I used wordpress only for the backend, I made a javascript theme and rest driven api, so there is no way to change the date format, correct? Thanks a lot all the same

    wpsolr
    Keymaster
    10 months, 2 weeks ago #34968

    You can check file wpsolr-pro/wpsolr/core/classes/engines
    /class-wpsolr-abstractsearchclient-root.php, where date is stored in $data_result[‘meta_information’].

    You cannot change it, but you can hide the date with CSS and use instead 2 custom blocks with filters: WPSOLR_Events::WPSOLR_FILTER_SOLR_RESULTS_DOCUMENT_GROUPS_INFOS and WPSOLR_Events::WPSOLR_FILTER_SOLR_RESULTS_APPEND_CUSTOM_HTML

Viewing 8 posts - 1 through 8 (of 8 total)

You must be logged in to reply to this topic.