have "read-more" go to top of page rather than where read-more tag is

  • Unknown's avatar

    When the reader of my blog clicks on “more”, I want the reader to be taken to the top of the page of the post, not to where the read-more tag was.
    I thought buying the custom design upgrade might allow me to do that, but now I am not sure (though I have a 30 day refund period anyway).
    At the following site http://codex.wordpress.org/Customizing_the_Read_More it says
    I just need to put the following code in the style sheet’s functions.php section. Then read-more will function the way I want.

    function remove_more_jump_link($link) {
    $offset = strpos($link, ‘#more-‘);
    if ($offset) {
    $end = strpos($link, ‘”‘,$offset);
    }
    if ($end) {
    $link = substr_replace($link, ”, $offset, $end-$offset);
    }
    return $link;
    }
    add_filter(‘the_content_more_link’, ‘remove_more_jump_link’);

    I tried this simple addition before I purchased the custom design. And I wanted to try it after I purchased it but I could see no natural place it would go in the css sheet (css isn’t quite programming code, whereas the above is, I guess, php code).

    The blog I need help with is: (visible only to logged in users)

  • Unknown's avatar

    That link goes to a WordPress.ORG help page – your blog here works way different in that area – you can’t alter the PHP code here, it is a security issue.

    I am not a CSS person but I have my doubts about the change, however wait until the two CSS people chime in.

  • Unknown's avatar

    @metalane
    What’s in the codex does not apply. Those instructions are for those who have wordpress.ORG installs and WordPress.com blog run on different software. We cannot access and edit the PHP underlying our themes. The custom design upgrade does not allow you to change functionality. It allows you to change appearance only. We cannot access the files the codex points to and edit themes or templates on this multiuser blogging platform; only Staff can. All blogs wearing the same theme are using the same templates. Any edit Staff make affects every blog wearing the same theme.
    http://en.support.wordpress.com/themes/editing-themes/

  • Unknown's avatar

    Right, that is PHP not CSS. I can help you with a refund if you want one. I think you should stick around! :) But if you want control over all the code, WordPress.org is the way to go. Here is a page about switching if you’re interested in learning more about that: http://en.support.wordpress.com/moving-a-blog/#moving-to-wordpress-org

  • Unknown's avatar

    Thanks for your extremely fast responses. They are indeed helpful. I suspected something like what you all said, but I wasn’t sure and so I thought I would ask. I’ll follow designsimply’s advice and stick around for two or so weeks while I still have possibility of refund, and then decide further.
    2 or so years ago, when I tried WordPress for the first time, I guess it must have been the downloadable version, I guess the wordpress-org. I didn’t explore it for too long – it was probably in an earlier wordpress state, and I the downloadable version was potentially more complicated anyway.
    I like the relative simplicity of what I am currently using. (oh, and a little pitch. it would be plus to have some newer themes with this feature of the read-more tag, although I am sure there are zillions of other requests for additions too).
    Again, thanks for your fine help, and I will be looking at some of the above links (in fact I have already started to) and I may explore some of the tutorials and info sites on the css material.

  • Unknown's avatar

    With the read more tag, it takes you to the the point you stopped reading on the main page. The reason this is done is so you don’t then have to scan around looking for where you left off reading. That isn’t a problem if there is only a paragraph or two on the main page, but if there are ten or so, then it gets harder to find.

  • The topic ‘have "read-more" go to top of page rather than where read-more tag is’ is closed to new replies.