picandocodigo / List-Category-Posts

WordPress plugin which allows you to list posts from a category into a post/page using the [catlist] shortcode.
http://wordpress.org/extend/plugins/list-category-posts/
GNU General Public License v2.0
241 stars 112 forks source link

Cannot sort the posts by different categories #519

Open jameslyf opened 1 month ago

jameslyf commented 1 month ago

Feature Request

Let's say the posts are within one same category but also fall in other categories. I want to list the posts with the same category ID=1 but also want to sort them by other categories. It seems I cannot make it work with "orderby" parameter. So I tried the following but it didn't work either:

[catlist id="1+2, 1+3, 1+4" pagination="yes" numberposts="20"]

I actually want to list all the posts within category ID "1" but sort them in the order of category ID "2, 3, 4". If the short code above works, that would help. I would like to know if there is any way I can achieve the result above? Thanks!

The only way it works is that I have to use 3 separated short codes to produce the result

[catlist id="1+2" pagination="yes" numberposts="20"] [catlist id="1+3" pagination="yes" numberposts="20"] [catlist id="1+4" pagination="yes" numberposts="20"]

However, it will produce an empty line between and also the pagination is not that useful at all in this situation.

My WP version is 6.4.5, and LCP plugin version 0.89.8