简体   繁体   中英

WordPress Newspaper theme page template displaying post thumbnails from the wrong primary category

I have a website that uses the Newspaper theme from TagDiv. I'm running into a problem where I want to have a flex block on my post template display other posts that are in the same primary category selected by the post. But if I have multiple categories selected, it does not display posts from the category that I marked as the primary one. I have my filter set to "Single - Related by Category" but it is displaying posts from the second category I selected (which is not the primary one). Has anyone run into this before and what did you do to solve it?

Ok, for those curious to know the answer for this one, I found out from the TagDiv team that the "Single - Related by Category" post filter does not reference the primary category at all when filtering posts, it just lists any posts that fit any of the selected categories. My solution was to update the title above the flex box to include all of the categories that are listed for the given post to match what the flex box is showing.

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.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM