Check if on page/blog or forum
Short question: How do I check if I’m on a page (or blog) from within ‘loop-single-reply.php’?
Long question: I use bbpress for all my comments on articles and blogs: ‘Use a bbPress forum topic for comments on this post.’
On my website this generates a first post along the lines of (my website is in Dutch): ‘This topic belongs to article <LINK>. Share your thoughts!’
This text is visible both under the actual article and on the forums. While it’s a good way to explain the purpose of the thread on the forums, it’s confusing as the first reply on the actual article page. Because of that I don’t want to show this first reply on all my blog / page ‘pages’, but do want to show them on the forums.
It’s fairly easy to remove the first reply within ‘loop-replies.php’, but I don’t know how to test whether I’m on the forums or not? Is_page doesn’t work, is_bbpress always returns true.
- You must be logged in to reply to this topic.