• Hello!

    I wan’t to get the first image of e.g. the latest 6 posts
    from a specific category and show the first image of everey
    post e.g. in the sidebar.

    Is that possible? How?

    Thank You ??

    (sorry, my english is bad, i now ;))

Viewing 1 replies (of 1 total)
  • By default, using the_content allows images to be displayed in a post, but you will also have text displayed. This is what is used on a normal single post view.

    On the other hand, the_excerpt can limit that text, but it cuts out images.

    So, how to go about it, I can think of two different methods, have a read on both and see what you think.

    1. Use the following plugin: The Excerpt Reloaded, and look at the allowedtags parameter.

    2. Read on Custom Fields, and then create a custom loop to show them.

    Post back if you have any further questions.

    Alex

Viewing 1 replies (of 1 total)
  • The topic ‘First image from post’ is closed to new replies.