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

Viewing 18 posts - 1 through 18 (of 18 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

Hi,

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

#111850

https://www.spdradnickikragujevac.com/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:

https://www.spdradnickikragujevac.com/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:

Screenshot-2019-09-23-Dokumenta-SPD-Radni-ki

#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.

#113807

After today’s update the problem is back 😐 What did you do last time that I can do myself and correct it? Where have you updated the date format in the custom code to Y-m-d?

#113944

Shahriar
Moderator

Please download this file https://www.dropbox.com/s/ymrx03p8h37vya4/wpdm-all-downloads.php?dl=1 and place it in /active-theme/download-manager/ directory. This new template will override the default template and updating plugin won’t remove this file.

#113951

It’s working. I hope it will last. Thanks.

#117602

Sebastian
Participant

Hey.. after updating to 5.0.4 the problem appears again.

$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’) )
);

doesn’t work. The Dropbox-File doesn’t work too. What to do now?

#117603

Sebastian
Participant

/download-manager/tpls3/wpdm-all-downloads.php

was the key 🙂 now it’s working

#119307

Sebastian
Participant

Hi,

after every single update the changes got lost..

is it possible to put the code in my child theme’s function.php instead of

/download-manager/tpls/wpdm-all-downloads.php

or

/download-manager/tpls3/wpdm-all-downloads.php?

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

The topic ‘Sorting desc by date format d-m-Y not working’ is closed to new replies.