I'm wondering how to fix broken comment anchor links. For example, on my blog's main page, http://torley.com , the default "Comment" link adds "#comments" at the end of an URL. Like this:
ยป http://torley.com/soundsnap-rocks-what-are-your-fave-sound-search-sites#comments
But, that doesn't actually anchor to the comments section. It still goes to the very top at the page. I've looked through the theme files but haven't found a clear way to fix this.
How do I make it so #comments at the end will redirect to the top of the comments for a post?
Many thanks in advance. :)
Why are you using encoded urls?
Open your theme's comments.php file, find <!-- center-widget-title --> or <div class="center-widget-title">, then add id="comments" to <div class="center-widget-title">, like this:
<div class="center-widget-title" id="comments">
This should work but if it doesn't, post the comments.php file to http://pastebin.com and post the link here.
@iridiax: What's a better way? I'm just going with what my theme currently uses.
@haochi: I didn't realize you could do that before. Thank you, I'll try that.
@haochi: Brill, that WORKED! Thanks a lot. If I could award points and glorify you more on here, I would.
dogdayfear
Member
Posted 3 years ago #
I have the same problem, and solutions proposed here didnt worked.
Here is my comments.php file: http://pastebin.com/m5888f830
Help will be appreciated. Thanks in advance.