Grow your CSS skills. Land your dream job.

Excerpt with image and link

  • # April 16, 2009 at 5:48 am

    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.

    # April 16, 2009 at 11:39 am

    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)

    # April 23, 2009 at 8:08 am

    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.

Viewing 3 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic.

*May or may not contain any actual "CSS" or "Tricks".