I’m having an odd issue with the Atomic Blocks theme. The date stamp on comments, which is a link, is producing a double URL that directs to the 404 page when clicked. I’ve looked at the theme code, and it seems to be fine. It’s also not related to plugins. So, I’m left thinking that it’s something with CP because it is different from WP.
Happy to provide file/code/screenshot. It’s a little thing, but it’s quite annoying.
Anyway I’ve got a screenshot of the link with the bad URL, and the markup structure around it, which will help to identify the right place in the theme:
So this should be get_comment_ID() instead, because comment_ID() displays the comment ID on the page, but this function should be returning it instead. This is the same in WordPress and ClassicPress.
I’m not sure how this code can work for anyone, and you should report it as an issue with the developer of the theme. To fix the issue on your site, you can replace it with get_comment_link( get_comment_ID() ) or just get_comment_link().
If you’re making this change directly in the parent theme, you’ll need to remember that it will be overwritten next time the theme is updated.
It’s not something you do every day, but especially in a longer discussion it’s really useful to be able to link directly to a specific comment or a specific comment thread. We do that a lot when pointing people to specific forum posts on Slack, for example.
Installing WordPress won’t fix this, it’s an error in the theme code.
You can edit the theme directly to use the correct function call, report the issue to the theme developer and get them to fix it, or make a child theme that overrides this specific part of the theme.