• jeremybeck

    (@jeremybeck)


    I use the “Read More” block for all of my posts. It works fine on the front page, displaying the initial excerpt and then allowing readers to click “Read More” in order to access that post’s individual page. What I want to change is WHERE the reader lands upon clicking the “Read More” link. Currently, if you click “Read More”, you’ll be taken to the proper post, but you’ll be transported all the way to the top of that post, requiring you to scroll down to get back to where you were. I’d prefer the destination to be the next line of text following the “Read More” block. (I definitely don’t want to “hide the teaser”, as I want the entirety of the post to appear on the post’s individual page.)

    I’ve done some Googling, and it seems that there are plenty of solutions to do the reverse, i.e., ensure that the “Read More” link takes viewers to the top of the post. This suggests that my desired behavior is the default, but it doesn’t work that way for me, and I’d much prefer that the jump point land on the next line of text AFTER the block. Any ideas?

    While I’m here, I’d also like the “Read More” link to appear in the search results. Currently, the search results only reveal the post’s excerpt, but they don’t include a “Read More” link, so it appears to readers that the post is shorter than it really is. It’s possible that this issue is theme-specific (I use the Astrid theme), but given that it’s related to use of “Read More”, I figured I’d ask.

    Thanks,
    Jeremy

    The page I need help with: [log in to see the link]

Viewing 5 replies - 1 through 5 (of 5 total)
  • Joy

    (@joyously)

    Here’s how it worked before there were blocks:
    The more tag (which is a HTML comment) is processed when the entire post content is shown on archive pages. The content is truncated there and a link to the single post page is added. This link contains a fragment identifier that targets the point at which the more tag was placed.
    If the full content is not shown on archive pages, the excerpt is shown (either generated by stripping HTML tags or what was manually written which can contain HTML). The excerpt is followed by a plain link to the single post page.

    Now that there are blocks, it’s really no different, but the block is 3 HTML comments instead of just one.

    When I go to your site, the HTML shows that your theme is showing excerpts, followed by a Read More link. The link is plain, as expected.

    Thread Starter jeremybeck

    (@jeremybeck)

    OK, so is there any way to fix it? To somehow add that fragment identifier back into the link? It just seems like the “Read More” option isn’t functioning as it’s designed to.

    Joy

    (@joyously)

    It’s not broken. You are (or your theme is) showing excerpts, so the link is plain. It just happens to say “Read More” when in fact the default is three dots. It’s not actually the more tag.
    If you show full content instead, the more tag would be processed, and the link would have the fragment identifier.

    Thread Starter jeremybeck

    (@jeremybeck)

    Ah, I see, thank you. I believe that I started showing excerpts because the homepage was cutting the posts off too early, and I wanted to choose where I could install the breaking point. When I set the excerpt length at something large (e.g., 700 words), then it deferred to where I placed the “More” block and started displaying as desired on the homepage. But now you’re telling me that, by doing that, I’ve interfered with the function of the “More” tag.

    I guess what I’m asking is, can I do both of the following at the same time?

    1. Insert a “Read More” link at a specific point (through use of the More block).
    2. Have that “Read More” link include the fragment identifier.

    Or are those two goals incompatible?

    Joy

    (@joyously)

    Your 1 and 2 are compatible with showing full content.
    Showing excerpts ignores the more tag.

    If your theme was cutting the posts off too soon, it wasn’t showing full content (or it had code that interfered with core WordPress handling of the more tag).

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Landing spot for Read More link’ is closed to new replies.