Order_by Not working in a shortcode

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

Rob Hole
Participant

Hello,

We are using WordPress Download Manager Special Pack in my site and using a shortcode as below.

“[wpdm-archive button_style=”default” link_template=”link-template-panel” items_per_page=”-1″ category=”council-agendas” order_by=”title” order=”desc”]”

We get listing of pdf in descending order but can’t get order_by: title.

URL: https://www.elkpoint.ca/governance/council-agendas/
SS for the same: https://share.getcloudapp.com/nOu8eLA6

We hope to get the proper way to resolve it.

Thanks in Advance.
Rob Hole

#126634

Nayeem Riddhi
Moderator

Hi,

Can you try order=”asc” in your shortcode, please check and let me know.

Thanks.

#126987

Rob Hole
Participant

Hello Nayeem,

Thanks for your feedback but I think you cant get our concern about that.
Here is our shortcode for the same:
[wpdm-archive button_style=”default” link_template=”link-template-panel” items_per_page=”-1″ category=”council-agendas” order_by=”title” order=”ASC”]

And, Here is SS for the same as well.
Image 2020-04-27 at 12.12.48 PM

But still, we can’t get what we want like order_by: title and order: ASC.

Thanks,
Rob Hole

#126993

Nayeem Riddhi
Moderator

Hi,

It is working fine from my side. Please, give your temporary wp-admin login details in a private reply for checking.

Thanks.

#127138

Rob Hole
Participant
This reply has been marked as private.
#127378

Nayeem Riddhi
Moderator

Hi,

Please check, I have created one page for test purpose, https://www.elkpoint.ca/wpdm-test/, it is working fine with order_by.

Thanks.

#127429

Rob Hole
Participant

Hello,

It’s Working fine for us as well just need to confirm one more thing for that.

Is that possible to show Order by:title and Order:ascending by default when the page is a load for the first time?
https://share.getcloudapp.com/eDu6gz75

Thanks
Robe Hole

#127855

Rob Hole
Participant

Hello Nayeem Riddhi,

We are waiting for your valuable response on that one.

Thanks
Rob Hole

#127877

Nayeem Riddhi
Moderator

Sorry for your having patience, i shall try to update you it today

#127947

Nayeem Riddhi
Moderator

Hi,

Please adjust the below code from your plugins > wpdm-archive-page > wpdm-archive-page.php in line number 607-608

 $order = isset($_GET['order']) ? esc_attr($_GET['order']) : 'title';
 $order_by = isset($_GET['order_by']) ? esc_attr($_GET['order_by']) : 'asc';

also, you have to adjust plugins > wpdm-archive-page > tpls> archive-page-extended.php in line number 27-45 for the design appearance,

` <span class=”col-md-6″>
<label for=”order_by”><?php echo __(‘Order By:’,’wpdm-archive-page’); ?></label>
<select name=”order_by” id=”order_by” class=”form-control wpdm-custom-select”>
<option value=”title”><?php echo __(‘Title’,’wpdm-archive-page’); ?></option>
<option value=”date”><?php echo __(‘Publish Date’,’wpdm-archive-page’); ?></option>
<option value=”modified”><?php echo __(‘Last Updated’,’wpdm-archive-page’); ?></option>
<option value=”view_count”><?php echo __(‘View Count’,’wpdm-archive-page’); ?></option>
<option value=”download_count”><?php echo __(‘Download Count’,’wpdm-archive-page’); ?></option>
<option value=”package_size_b”><?php echo __(‘Package Size’,’wpdm-archive-page’); ?></option>
</select>
</span>
<span class=”col-md-6″>
<label for=”order”><?php echo __(‘Order:’,’wpdm-archive-page’); ?></label>
<select name=”order” id=”order” class=”form-control wpdm-custom-select”>
<option value=”ASC”><?php echo __(‘Ascending Order’,’wpdm-archive-page’); ?></option>
<option value=”DESC”><?php echo __(‘Descending Order’,’wpdm-archive-page’); ?></option>

</select>
</span>`
you can also follow this doc for settings the templates,

Template Files

Thanks.

#127987

Rob Hole
Participant

Hello Nayeem

Thanks for your response.
It helps us so much.

Thanks again
Rob Hole

#134861

Rob Hole
Participant

Hello Nayeem,

We are facing the same issue again in wpdm we need to sort sidebar in desc order and listing in asc order we get listing in proper order but we cant get sidebar in desc order.
We tried order=”desc” in our shortcode but still, we cant get that.
Here is URL for the same:

Council Minutes

Waiting for your response ASAP.

Thanks
Rob Hole

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

The topic ‘Order_by Not working in a shortcode’ is closed to new replies.