tags:

views:

27

answers:

3

when I click on the comments link on my blog the page is not redirecting to the link -- wordpress/?p=3#comments, rather stays in the same page. can anyone help me why this is not working?

A: 

Can you please specify the URL you're located at and the link URL you're trying to click? It's not clear now.

Mad
1. http://localhost/wordpress/2. "http://localhost/wordpress/?p=3#comments"
santanu
+1  A: 

The hash symbol (#) in a link tells the browser that it's an on page place anchor.

In this case, #comments is the place link and somewhere on the page is an anchor tag named comments.

If you look in the source code you should find a link in there like this:

<a name="comments"></a>

So when someone clicks on a link with #comments on the end, the browser knows to scroll down or up to that point on the page marked out by that anchor.

This isn't limited to just anchors and can be used to jump directly to a DIV or other sections on the page by a similar attribute markup.

Say on a long page you have many sections. If you want people to jump right to that section, you can add an ID to the element, DIV or heading like so:

<h3 id="privacy">Privacy</h3>

And to have them jump right there with a link, you can use this:

<a href="#privacy">Jump to privacy</a>

If you're clicking and nothing happens, no jump, no scroll, then it's most likely that the browser cannot find an element with a matching name or ID anchor point.

random
A: 

Do you have custom theme installed, or altered any of the theme's files? Could you provide a link to the page, so people can take a look what might be wrong?

Edit: If the page is relatively short, which could mean that the comments section is already visible, it might be that the browser decides not to scroll to that section.

Rob van Groenewoud
Links on localhost will only work on your machine. Please use external IP address.
Rob van Groenewoud