WordPress.org

Ready to get started?Download WordPress

Forums

<!--more--> Problem (7 posts)

  1. pt75
    Member
    Posted 9 years ago #

    Hi everybody,
    I’m a newbie with WordPress.
    I have the following problem.

    I use the quicktag <!--more--> when a single post is too long to be displayed on the home page. When the user clicks on the generated “read more�, single.php is loaded for displaying the single post. That's ok.
    However, to what I see, WP places an anchor tag inside the post, so that the new page is displayed starting from the anchor point, i.e. from the point in which I put <!--more--> and not from the beginning of the page. In other words, the user should scroll up to see the whole post and page (e.g. the toolbar and the page banner that are above the post).
    How to display the whole page?
    Many thanks.

  2. fallingj
    Member
    Posted 9 years ago #

    I'm trying to find a solution to this problem, too.

    Any help would be great.

  3. Avenir
    Member
    Posted 9 years ago #

    The idea with the <!--more--> quicktag is that when the user finishes reading what's displayed on the front page, they click the link so they can continue reading. Since they've already read what comes before the <!--more--> tag, they don't need to see it again right away, so they are just taken to the place where the post was cut off on the front page. The whole entry is still displayed on the single post page, it's just that, like you said, the reader needs to scroll up to read what came before. It's not a problem really, just a matter of convenience to the reader.

    But, alas and alack, I don't know what core function controls the way the <!--more--> tag works, so I don't know where to tell you to look to remove the anchor. You might try looking in template-functions.php and searching for the_content because that tag controls the text that is displayed for the more link and may lead you to another place where the actual link is created.

  4. vkaryl
    Member
    Posted 9 years ago #

    Why can't you just put the quicktag at the start of the post then, if you want to re-display the whole post on the "more" page?

  5. pt75
    Member
    Posted 9 years ago #

    I can't put <!--more at the beginning of the post, since in that case the user don't see anything about the post but "continue".
    I tryed to start the loop in single.php just after <body> tag, creating the the anchor just after <body>. This works quite fine, but in this case, the first line is the first line of the body. In other terms, if you have a site made with, for instance, <body><div id="container">...</div></body> and container has a margin-top greater than zero, you need to scroll up to see this margin. I want display the whole page, no scroll from the user. Help!!!
    I'll try to look at functions.php.

  6. Kafkaesqui

    Posted 9 years ago #

  7. pt75
    Member
    Posted 9 years ago #

    Works great! Thanks.

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.