WordPress.org

Ready to get started?Download WordPress

Forums

`<!--more-->` doesn't work (13 posts)

  1. ManiacSoftwareManiacsOrg
    Member
    Posted 9 years ago #

    Hi!

    Just installed WordPress 1.5 on my site: http://SoftwareManiacs.Org/blog . Then I made a rather long post and tried to use 'Read More' feature: put <!--more--> after 4 first paragraphs. However it doesn't work - the tag is replaced with <a id="more-4"></a> and then the rest of the post follows uncut. This happens both in my custom theme and in the default one.

    Perhaps I managed to switch off a useful checkbox somewhere, but I can't find anything resembling... Please help! :-)

    Thanks in advance.

  2. Mark (podz)
    Support Maven
    Posted 9 years ago #

    Was it like this:

    blah blah blah blah blah blah <---more---> blah blah blah
    or
    blah blah blah
    <---more--->
    blah blah blah

    the second way is better.

  3. Lorelle
    Member
    Posted 9 years ago #

    And take a moment to look at how you can customize the "more" tag at http://codex.wordpress.org/Customizing_the_Read_More which also might help you.

  4. ManiacSoftwareManiacsOrg
    Member
    Posted 9 years ago #

    Tried on a separate line. Same reaction, just the empty links is now in its own paragraph.

    Yes, I've read Codex about Read More before posting here... As far as I understand simple <!--more--> without customisation should work. But doesn't...

  5. Mark (podz)
    Support Maven
    Posted 9 years ago #

    Ah..........one post per page = 'more' does not work.
    Though it's not looking great on the archive page either:
    http://softwaremaniacs.org/blog/?m=200505

  6. darkcanuck
    Member
    Posted 9 years ago #

    The <!--more--> tag won't be used when viewing a single post, only when looking at the index or archives. If you want to do paging within a post you can use <!--nextpage--> instead (but your template may need to be changed to support this).

  7. ManiacSoftwareManiacsOrg
    Member
    Posted 9 years ago #

    Actually I have 10 posts per page in the config. Or do you mean it won't work with only one post in whole database?

    And on archive page it breaks not in the place where I put <!--more-->. Strange %-)

  8. ManiacSoftwareManiacsOrg
    Member
    Posted 9 years ago #

    Amm... Well :-). I understand that single post may look confusing. But, yes, I can't get it working on the index page. And with default template (Kubrick) too.

  9. darkcanuck
    Member
    Posted 9 years ago #

    Your template may be showing the excerpt instead of the post content. The excerpt is automatically created and always gets cut off to a certain length.

    If you only have one post in the database, WordPress may go into single post mode. It's silly, but that's what happens.

    Looks like it's working now with the second post added...

  10. ManiacSoftwareManiacsOrg
    Member
    Posted 9 years ago #

    Ah! That was it. I've added second post (though already deleted) and 'Read More' links have magically appeared :-). Now I'll just wait for blog to grow beyond its start.

    Thank you for keep sying me about 'single page' issue. But isn't it a bug actually?

  11. darkcanuck
    Member
    Posted 9 years ago #

    I think so and I've seen other complaints about it too. But others claim it's a feature. It all depends on your point of view, I suppose...

  12. miri
    Member
    Posted 9 years ago #

    I just installed 1.5.1 on a test server and imported content from a very old Postnuke site. I am cludging together the post nuke "homepagetext" and the "bodytext" into the WordPress "post_content" field like this:
    '".homepagetext."\n<!-- more -->\n".bodytext."'

    I'm using the default template (until I can get this sorted out) and I don't get a "read more" link. If I edit the post, I can see the "yadda, yadda
    <!-- more -->
    yadda, yadda" text, but it's not displaying. If I take out the "<!-- more -->" and then add it back in and save the post, everything is fine. Any ideas? I've tried using line feeds and straight br tags, neither seems to help.

  13. Michael Bishop

    Posted 9 years ago #

    Not completely related to most current discussion, but on topic to the thread title, I had some serious issues with the more tag and validating my site. I have some longer post titles, and I don't know, but the permalink structure or something, was pushing a onto another line, and causing the validation to kick back. I ultimately figured out that the more tag automatically puts a closed p tag into the post. Also, though podz suggested putting the more tag on its own line, I couldn't do that and validate. Once I inserted the more tag right inside the text, and removed my closing tag, I validated.
    Odd behaivor, IMO.

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags