Exclude current post if Query Loop placed on Single Post page
-
(ref. Gutenberg 11.8.1)
I am aware that FSE is still currently in development, but while experimenting with it I have noticed the following:
I think it is quite common that one would wish to add links to other posts below a post (perhaps related articles or just other articles to read).
If I wish to put a Query Loop at the foot of my Single Post page, there is currently no way of excluding the current post from that Query Loop. So, if the article is the most recent article on the site, and the Query Loop is displaying the most recent articles from the site (for example), the post whose page you are on is also displayed in the Query Loop.
I see that there are options to include or exclude sticky posts, and filter by categories, tags, author and keywords, but as far as I can tell there is no way of excluding the current post from the loop. Using categories or tags to loop through related articles would also seem to throw up unusual behaviour, given that the Single Post template would be applied site-wide and there wouldn’t be a correlation between the categories selected in the editor and the post that was being shown.
I am posting this here in the vain hope that someone from the project will read this and consider researching for future inclusion, or that someone else has already come across these issues and has found a resolution or workaround.
- The topic ‘Exclude current post if Query Loop placed on Single Post page’ is closed to new replies.