Make WordPress Core

Opened 10 years ago

Closed 10 years ago

#18277 closed feature request (invalid)

Remove ?replytocom=xx from the URL

Reported by: gazpachu Owned by:
Milestone: Priority: normal
Severity: normal Version: 3.2.1
Component: Comments Keywords:
Focuses: Cc:


In order to make more semantic the IDs of an article's comments, I've set the comments div IDs to start with "1". In this way I can redirect the user after posting a new comment to the right ID.

i.e. If the article has 17 comments and the user posts a new one, he will be redirected to http://domain.com/article#comment-18

I prefer this way but now I have a problem with the "?replytocom=xx" in the URL. The comment ID in the replytocom is something like "4867" and that doesn't make sense with my approach.

Is it possible to hide/remove this var in the URL while keeping the reply functionality?

Change History (3)

#1 @ocean90
10 years ago

  • Milestone Awaiting Review deleted
  • Resolution set to invalid
  • Status changed from new to closed

Next time please take first a look at the core functions or try our forum http://wordpress.org/support/.

You can use these filters: comment_reply_link, cancel_comment_reply_link and/or comment_id_fields.

#2 @gazpachu
10 years ago

  • Resolution invalid deleted
  • Status changed from closed to reopened

I've took a look at the codex and forums before posting here.

I don't see how those filters can hide/remove this var in the URL while keeping the reply functionality.

#3 @cnorris23
10 years ago

  • Resolution set to invalid
  • Status changed from reopened to closed

ocean90 was right. This is for the support forums linked above. The filters he provided don't, themselves, remove the 'replytocom' query arg. They just give you an access point to remove them. Try using those filters with remove_query_arg(). This should work, and if you have further questions, please use the support forums.

Note: See TracTickets for help on using tickets.