Forums

limit characters display on the index page (13 posts)

  1. Anonymous
    Unregistered
    Posted 5 years ago #

    Is there any hacks or plugins, that can limit how many characters you want to display in the post on the index page.
    For example. I post a article or something and I want it to display 200 words only in the index... and they can view the rest when that click on that article or the link to that article.
    thanks.

  2. podz
    Support Maven
    Posted 5 years ago #

    Write your whole entry.
    Put the cursor back to where you want your 200 words to 'end' the click the "more" tag.
    That will insert <--more--> into what you see.
    Your visitors will see all the text up to that <--more--> tag, and they will also see (more) in brackets.
    If they click that, they see the whole thing.

  3. Daisyhead
    Member
    Posted 5 years ago #

    When I try that on my hubby's blog (www.whitesail.org) I don't get the "(more)" showing up. All I get is a "," with a link to the rest of the entry. Any clue why?
    Thanks,
    Daisyhead

  4. codergurl
    Member
    Posted 5 years ago #

    try this in the template:
    <?php the_content('(more)'); ?>

  5. Daisyhead
    Member
    Posted 5 years ago #

    Hmm. That seems to have worked. Any idea why I would need to change that in my template? Shouldn't it be in the template already?
    Thanks so much Codergurl!
    -Daisyhead

  6. Sushubh
    Member
    Posted 5 years ago #

    u are not changing the template. u are just telling the engine where to break the content...
    u might want some post to show fully and some to not.
    so the power reamins in ur hands :D

  7. Daisyhead
    Member
    Posted 5 years ago #

    Right. But it seems to me if people are going to use that option to break content, it should be automatically in the template, since there is a quicktag for the function. Regardless, it's working and I'm just grateful for the help! =)
    -Daisyhead

  8. Anonymous
    Unregistered
    Posted 5 years ago #

    thanks, that did the trick. But is there any way it can automatically add <-- more --> tag after 200 words...? Cause not all posters will add the tag or can counted how many they have already typed.
    thanks again.

  9. podz
    Support Maven
    Posted 5 years ago #

    Word counting is not built into WP, and we all use that tag at different places.. so a quicktag it will remain I guess.

  10. Sushubh
    Member
    Posted 5 years ago #

    as i said before...
    Power in your hands. Wouldn't u hate it to break off a post with 205 words?

  11. raspberryvixen
    Member
    Posted 5 years ago #

    Since I'm a dingbat and my brain isn't working today...how do you get that tag to change the text? "More" is boring, I'd like something with a little more snap, depending on my site's design at the time, as well.

  12. podz
    Support Maven
    Posted 5 years ago #

    http://wordpress.org/support/index.php?action=vthread&forum=3&topic=4073&page=0
    You can't have multiple 'more' with different names though..

  13. Beel
    Member
    Posted 5 years ago #

    Research, research, research:
    http://wiki.wordpress.org/the_content

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.