fbpx

Sorting desc by date format d-m-Y not working

This topic contains 11 replies, has 4 voices, and was last updated by  Shahriar 2 weeks, 4 days ago.

Viewing 12 posts - 1 through 12 (of 12 total)
#111447

My code look like this:

[wpdm_all_packages items_per_page="20" order_by="publish_date" order="DESC" jstable=1 cols="title,package_size|download_count|publish_date|download_link" colheads="Dokument|Broj preuzetih dokumenata|Datum|Preuzeti"]

my date is all messed up. I try to add DD/MM/YYYY and %d-%m-%Y in order attribute and has changed but not like it should be.

#111847

Salahuddin Ahmed
Moderator

Hi,

Could you please share the link where you used the above shortcode?

#111850

Dokumenta

but here
https://wordpress.org/support/topic/sorting-desc-by-date-format-d-m-y-not-working/

someone already answer me that will be fix on next update? When will be next update?

#111909

Shahriar
Moderator

Okay, please wait for the next update.

#112611

After update still not working properly. You can see here:

Dokumenta

#112749

Shafayet
Moderator

In your URL, looks like it is working fine.

#112782

Please take a closer look at where it is indicated by the red arrows:

https://ibb.co/QKnTygH

#112888

Shahriar
Moderator

Please send temporary wp-admin login info in private reply or find the following line in /download-manager/tpls/wpdm-all-downloads.php file,

$dor = array('publish_date' => strtotime(get_the_date()), 'create_date' => strtotime(get_the_date()), 'update_date' => strtotime(get_the_modified_date('', get_the_ID())));

and replace it with this code,

$dor = array(
'publish_date'  => strtotime( get_the_date('Y-m-d') ),
'create_date'   => strtotime( get_the_date('Y-m-d') ),
'update_date'   => strtotime( get_the_modified_date('Y-m-d') )
);
#112902
This reply has been marked as private.
#112919

Shahriar
Moderator

I have updated the date format in the custom code to Y-m-d It seems that did the trick.

#112920

Now is fine, thanks, but I didn’t understand what you do? After your next update is it gonna be like this or it’s gonna messed up?

#112923

Shahriar
Moderator

We will add the fix on our side too before the next release.

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

You must be logged in to reply to this topic.