WordPress.org

Ready to get started?Download WordPress

Forums

Short Entry? (5 posts)

  1. vamped
    Member
    Posted 7 years ago #

    Hey guys,

    Is there a way to make only a specified amount of words appear for a post? I'm not up for havign excerpts for what I'm doing, or the <!-- more --> quicktag, but it would be awesome if there is a PHP code for it.

    I'm iffy on using a plugin because sometiems plugins don't work with newer versions of WP.

    James

  2. Chris_K
    Member
    Posted 7 years ago #

    so uh... in your vision, where do the rest of the words go?

    If you're truly opposed to clicking the more quicktag button, why not just convert your theme to use the_excerpt? You don't have to fill in the excerpt field on the Write post page -- if that's empty, WP will just show x number of chars from the main post.

    or, to save typing for my 3rd thought, see my reply here from 3 minutes ago: http://wordpress.org/support/topic/85994?replies=2

  3. vamped
    Member
    Posted 7 years ago #

    Will it? I didn't know that. What do you mean by converting, and how would I do that?

    Thanks for the great assistance.

  4. Chris_K
    Member
    Posted 7 years ago #

    Well, the converting depends on your theme, but in general, check out your theme's index.php file. In there you'll find a line of code calling the_content(). Try replacing it with the_excerpt() and see how that works.

    The other post I linked (in my first reply to you) refers to a plugin that enhances/replaces the_excerpt, but make that phase b. ;-)

    http://codex.wordpress.org/Template_Tags/the_excerpt
    http://codex.wordpress.org/Template_Tags/the_content

  5. vamped
    Member
    Posted 7 years ago #

    Woops, didn't click. Works perfectly.

    You're awesome :-)

Topic Closed

This topic has been closed to new replies.

About this Topic