'Order by' specified order in Woocommerce shortcode
I am currently using the shortcode: [product_categories ids="135, 214, 244, 1958, 72, 205, 43, 559, 73, 1033, 69, 2009, 1365, 1250, 462, 346, 1649, 1344, 1379, 1373" orderby="id"] to display Woocommerce product categories on a Wordpress site. It works, but I need the categories to be displayed in the order that they're listed in the ids quotations. I know of orderby="name", "date", and "id", and none of those will work for this particular task unless you know of any nifty hacks that involve them. Any Ideas? Thanks
I haven't solved the issue but I'm going to post this work around as an answer in case anyone else is struggling with this. Just re-ordered the sub-categories in the order you want them displayed manually. Do this with the drag-and-drop method in WooCommerce > products > categories. Then in your short-code, write: [product_categories parent="*your parent category id*" ids="*the sub-category ids you want displayed*" hide_empty="0"] This will display your specified sub categories in the order that you put them in with the drag and drop. Note: If you want to hide categories without any products in them remove the 'hide_empty' portion of the short-code. Also when displaying multiple sub categories, remember that the ids are separated by commas. ie: ids="1, 2, 3" If anyone knows the short-code solution please post/comment, because the drag and drop method is very time consuming when you have hundreds of categories.
Sharing complex objects across controller methods Laravel 5.1
Query optimization for laravel pagination
echo selected in chosen select
Yii 1.1x logs out the user before session timeout
PHP Moving an array into different text files?
PHP and Highcharts
insert function and session into database
testing contents of loadHTML($str)
Parse tables using Symfony DomCrawler
Allow user to delete their entries
PHP external API access fails, when called from another page on same domain?
Inserting data from excel into PHP application, don't works
htacess file unable to retrieve authenticated/logged in user when request is ajax
Random quote from file with PHP [duplicate]
How do i clear this array by user input in php/html?
How to detect that a MySQL table has been saved to attach an event?