How to order documents within wpdm_tree [WPDM Extended Shortcodes] [Workaround]
-
Currently, in the wpdm_tree shortcode display, the documents are loaded by the default, ‘post_date’ field. I wanted to order it by title instead. Here is the workaround:
// wpdm-extended-shortcodes.php ~ line 420 // All files $params = array( 'post_type' => 'wpdmpro', 'posts_per_page' => 9999, 'orderby' => 'title', 'order' => 'asc' );
Of course, unfortunately, this edits the plugin’s source code, so you can no longer update the plugin (good to add to the notes at the top of this file to remind).
Here are all the options you can use: https://codex.wordpress.org/Class_Reference/WP_Query#Order_.26_Orderby_Parameters
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘How to order documents within wpdm_tree [WPDM Extended Shortcodes] [Workaround]’ is closed to new replies.