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

in Download Manager Free

Viewing 18 posts - 1 through 18 (of 18 total)
Aug 28, 2019 at 7:24 am
#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.

Sep 1, 2019 at 5:04 pm
#111847

Hi,

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

Sep 1, 2019 at 5:54 pm
#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?

Sep 2, 2019 at 12:28 pm
#111909
Moderator
Shahriar
Staff

Okay, please wait for the next update.

Sep 19, 2019 at 6:48 am
#112611

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

Dokumenta

Sep 23, 2019 at 8:02 am
#112749
Moderator
Shafayet
Staff

In your URL, looks like it is working fine.

Sep 23, 2019 at 3:57 pm
#112782

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

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

Sep 25, 2019 at 8:54 am
#112888
Moderator
Shahriar
Staff

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') )
);
Sep 25, 2019 at 11:10 am
#112902
This reply has been marked as private.
Sep 25, 2019 at 4:20 pm
#112919
Moderator
Shahriar
Staff

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

Sep 25, 2019 at 4:30 pm
#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?

Sep 25, 2019 at 4:55 pm
#112923
Moderator
Shahriar
Staff

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

Oct 22, 2019 at 4:07 pm
#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?

Oct 26, 2019 at 8:44 pm
#113944
Moderator
Shahriar
Staff

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.

Oct 26, 2019 at 11:26 pm
#113951

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

Jan 6, 2020 at 7:35 am
#117602
Participant
Sebastian

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?

Jan 6, 2020 at 7:40 am
#117603
Participant
Sebastian

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

was the key 🙂 now it’s working

Jan 31, 2020 at 7:23 am
#119307
Participant
Sebastian

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.