treehouse : what would you like to learn today?
Web Design Web Development iOS Development

Excerpt with image and link

  • Hi all!
    Now I am in the process of designing my first theme and I want to have some videotutorials just like on this site. I would like the post about the video to be just like an excerpt with a miniature image, and when you click on the post you get to the full post with the video and more information.

    I have managed to show just the excerpt (just text) to specific categories on the first page, but when clicking on it it shows the post with only the excerpt.

    I´m guessing this is a simple design flaw of mine. Should there be a template for single post showing the full post?

    And how can I insert an image in the excerpt with a link to the full post? (When I just inserted an image with html it broke my post design.)

    I just solved the first issue. A single.php template was just missing.
    Now, to insert an image in the excerpt that does not mess up my design and provides it with a link is next on the list.
  • I'd look into using Custom Fields to apply that image, and then pulling it out and displaying it in the same loops you use to display the excerpt:

    http://codex.wordpress.org/Using_Custom_Fields

    (The custom field would be a link to the location of the image)
  • Thanks for pointing me in the right direction Chris, I´ll look into custom fields. Seems like a not so known feature but yet very powerful.