New to WordPress in general, been having fun playing about with themes.
I have a site at the moment with a Latest Posts box at the top. I want this to display the 5 latest posts made to any category.
The problem I have is, this list only display posts from the category you are currently on. Ie, when on website.com/?cat=6
, it only displays posts from category 6, but I want it to always have a list from all categories.
Is this doable?
The following function should do what you want, in addition examples have been provided:
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.