WordPress.org

Ready to get started?Download WordPress

Forums

"Top of the page" blues... (7 posts)

  1. Jeff Starr
    Member
    Posted 8 years ago #

    Hello, I am using WP version 1.5.1.3. I tried searching the forums (also google search) before asking this question, but didn't find anything that helped. Any help would be greatly appreciated.

    Currently, whenever a user clicks on a permalink (i.e., link to that post's comments), the link directs the user to the *top* of the comments page. This also seems to be the case for the 'previous' and 'next' links (i.e., they jump to the *top* of the next page). Okay...

    The layout I am currently working on displays the comments (and corresponding post) way down below a bunch of other stuff, so that the user has to scroll down quite a bit to see them.

    Is there a way to change the target location of the permalinks and prev/next links? It would be great to be able to designate anchors of some sort so that users won't have to scroll two screens down before seeing the comment or next post.

    I hope that was somewhat clear...

  2. moshu
    Member
    Posted 8 years ago #

    1. Upgrade, that's always a healthy move :)
    2. The permalink and the comments anchor are not the same.
    e.g. clicking the title should go to the single post view and at the top of it;
    while clicking on the 0/1/x Comments link should go to the comment form, indeed.
    3. WP does that, I mean adding "#comments" at the end of the address - you just have to place the target in the proper place in your template file(s).

    I don't know how to change the "target" for the next/previous.

  3. Jeff Starr
    Member
    Posted 8 years ago #

    Thanks for the speedy response! However:

    1. When I click on the title, it goes to the top of the single post page, not the top of the post view itself (unless they are the same thing).

    2. When I click on the 0/1/x comments link, it also goes to the top of the single post page, not to the comment form.

    3. I am confused by your third comment -- could you provide an example?

  4. moshu
    Member
    Posted 8 years ago #

    3. http://www.transycan.net/blogtest/
    or here: http://www.transycan.net/wp/
    Click on the Comments link below any post

  5. Jeff Starr
    Member
    Posted 8 years ago #

    Yes, thank you -- I have something to work with now.. the comments link target is a helpful tool, indeed.

    Still, I need a way to target the top of the single post view itself, for both previous/next links and single post view links. Do you know where these functions are in the WP source files?

    *Any* clues will help!

    Thanks again!

  6. moshu
    Member
    Posted 8 years ago #

    There is a reference for all the WP functions here:
    http://redalt.com/xref/trunk/nav.htm?_functions/index.htm

    I don't know how could you make the permalink not to go to the top of the single post view.

  7. Jeff Starr
    Member
    Posted 8 years ago #

    Okay, thanks again moshu.

    Maybe somebody else has some ideas?

Topic Closed

This topic has been closed to new replies.

About this Topic