WordPress.org

Support

Support » Plugins and Hacks » [Resolved] Show only in excerpt

[Resolved] Show only in excerpt

  • Hey,
    I used to have a plugin that gave me more markup options in post (like <!–more–>). In specific it had something like <!–preview_only–>, which you could put content (like a avatar image) that would only show on the main page, but after you click “Read More”, dissapears.

    Point is, I use wordpress for cd reviews, and I would like on the frontpage to show all the excerpts (stuff béfore the <!–more–> tag) with a small coverart. When you click “read more”, the small cover in the excerpt dissapears and only the text remains.

    I know this plugin is available (I used it a while ago), but I cant seem to find it anywhere :S

Viewing 6 replies - 1 through 6 (of 6 total)
  • Jeremy Clark

    @jeremyclark13

    Member

    You could the same thing with custom fields. Although it would take a little coding but not much. Have a read over custom fields.

    I really don’t understand the utility of a plugin to do so…

    In your “write post” section of your adminsitration panel, you have a field “optional excerpt”…

    If you fill this field, this is what will be displayed as “the excerpt”

    1- So, in this field, put only the cd cover image… And anything else you want there…

    2- In “the content”, write the text you want to show when visitors click the read more to read the entire post.

    3- On your front page, or in the category page, use <?php the_excerpt(''); ?> in the loop to display only the optional excerpt (i.e. your cd cover image)

    4- On your single post, use <?php the_content(''); ?> to display only the text you wrote in the content.

    S.

    Jeremy Clark

    @jeremyclark13

    Member

    The only problem with that is if the OP has the feed to only show the excerpt then only the image will be shown. But by using a custom field the image can be shown on the front page and the feed can still use the excerpt that’s automatically generated.

    Totally Right jeremyclark…

    So, an alternative easy solution I would use :

    The post-image plugin from Kaf :

    http://guff.szub.net/2006/02/09/post-image/

    This plugin give you the possibility to use the tag <?php post_image(); ?> to display the first image relative to a post…

    So…

    1- You can install this plugin

    2- In your home page loop and category loop, use only the tag <?php post_image(); ?> to display only the cd cover, and do not show <?php the_content(''); ?>

    3- In your single post loop, do not use the tag <?php post_image(); ?> and display only <?php the_content(''); ?>

    Short and sweet…

    🙂

    S.

    Jeremy Clark

    @jeremyclark13

    Member

    Very good solution Simon.

    Thanks Simon, that plugin solves allot and even more! 😀

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘[Resolved] Show only in excerpt’ is closed to new replies.
Skip to toolbar