Shortcode is displaying posts not in the correct category
-
Hello. I have a page on my blog that shows all the posts in the Focus of the Week category. I am using this shortcode:
[display-posts category="focus-of-the-week" posts_per_page="-1" include_date="true" ]
The issue is that it seems to display every single blog post that was ever marked as the Focus of the Week category, whether I changed the blog post’s category or even if I permanently deleted the post.
The page shows three blog posts. The top post, “Test,” has been permanently deleted. The second post originally had the Focus of the Week category, but I changed the category to something else. The only post that should be included on this page is the last article.
I’ve tried clearing my browser cache, changing to the Twenty Sixteen theme, and checking my blog in another browser. Any ideas?
The blog I need help with is: (visible only to logged in users)
-
Okay, so after some more testing, I figured out that if I edit the shortcode to something different and then change it back, everything works as it should.
However, this isn’t an ideal workaround. Every time I add a new article in the Focus of the Week category, I have to edit the shortcode to get it to display in the list on the page. This can’t be the way that shortcode was designed, right? I would have thought it’d automatically update any time it detects a new blog post in the category. How do I get the shortcode to work without having to edit it every time?
-
- The topic ‘Shortcode is displaying posts not in the correct category’ is closed to new replies.