You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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:
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
The plugin does not support such custom sorting at the moment, but there is a workaround you can implement.
Add a custom field to each post you want to sort, e.g. order_group, and assing a numeric value that corresponds with the desired order of the post
Add customfield_orderby parameters to your shortcode, it should look something like this: [catlist id="2,3,4" pagination="yes" numberposts="20" customfield_orderby="order_group" customfield_orderby_type=NUMERIC]
Now, if
all posts from cat id 2 have order_group=3
all posts from cat id 4 have order_group=2
all posts from cat id 2 have order group=1
in the resulting list you will have posts from cat 2 first, then cat 4, then cat 2.
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
The text was updated successfully, but these errors were encountered: