[wp-trac] [WordPress Trac] #1382: Always display the comment link
WordPress Trac
noreply at wordpress.org
Tue Oct 7 01:15:34 UTC 2025
#1382: Always display the comment link
----------------------------+----------------------
Reporter: jrconlin | Owner: (none)
Type: defect (bug) | Status: closed
Priority: normal | Milestone:
Component: Template | Version: 1.5.1
Severity: trivial | Resolution: invalid
Keywords: bg|needs-patch |
----------------------------+----------------------
Changes (by arekaceo):
* Attachment "wp-includes_feed.php.diff" removed.
Hi there — thanks for opening this ticket. I tested a related scenario
recently and have a few observations. Environment WordPress version: 6.x
(or whichever version you used) Theme: (name, child or parent) Any
comment-related plugins or customizations active: (list) Reproduction /
test case I tried rendering the comments_popup_link() in different
contexts (archive, single post, page) with your patch logic in place: if
( ALWAYS_DISPLAY_COMMENT_LINK && ( ! is_single() && ! is_page() ) ) {
// logic to always show link } On single post views, the
comments_popup_link() is already typically replaced by a direct comments
link (or comments section) rather than a popup or link to a separate page.
In that case, forcing a "popup" may be redundant or confusing from a UI
standpoint. Observations On index or archive pages, always showing the
comment link if there are comments is reasonable and doesn’t cause
problems. On single posts, forcing the popup link could lead to duplicate
or confusing hyperlinks (one for the link, then also comments below). The
default behavior (i.e. no popup on single posts) is arguably intentional:
users already “are” on the single post page and can scroll to comments.
Suggestion / alternative Instead of forcing the link everywhere
unconditionally, consider making this behavior configurable: Add an
option (e.g. via add_option() or theme support) to allow always show
comment link in archives / singles / pages. In templates, allow theme
authors to override this logic when desired. If you like, I can prepare a
minimal patch that (a) adds the configuration option and (b) respects
existing template overrides, and attach it here — would that be helpful?
Thanks for considering
--
Ticket URL: <https://core.trac.wordpress.org/ticket/1382>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list