- This topic has 11 replies, 2 voices, and was last updated 5 years, 5 months ago by
Rob Hole.
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
Hi,
Can you try order=”asc” in your shortcode, please check and let me know.
Thanks.
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.

But still, we can’t get what we want like order_by: title and order: ASC.
Thanks,
Rob Hole
Hi,
It is working fine from my side. Please, give your temporary wp-admin login details in a private reply for checking.
Thanks.
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.
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
Hello Nayeem Riddhi,
We are waiting for your valuable response on that one.
Thanks
Rob Hole
Sorry for your having patience, i shall try to update you it today
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,
Thanks.
Hello Nayeem
Thanks for your response.
It helps us so much.
Thanks again
Rob Hole
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:
Waiting for your response ASAP.
Thanks
Rob Hole
The topic "Order_by Not working in a shortcode" is closed to new replies.