Support » Themes and Templates » Excerpt looking bad

Excerpt looking bad

  • Hello.

    I recently changed the excerpt lenght from 50 to 150 words because I want more unique content on the first page. The problem is that it looks really bad because the text doesnt fit with the featured image. I don’t really know how to explain, so here’s a screenshot:


    This is one example. I would like to modify the theme so the excerpt would go under the image and to show the newlines too. I’m using a custom theme found on the internet.

    Can I do this? Where do I need to look and what do I have to change / add? I really like this theme, I don’t want to change it.

    Thank you.

Viewing 4 replies - 1 through 4 (of 4 total)
  • It’s tricky to judge without seeing the code but your excerpt looks like it’s either surrounded by a div with a margin on it or a block so that you get:

    image | excerpt area

    What you need is the following (rough suggestion)

    <img src=""/><?php the_excerpt(); ?>

    If you can paste a ilnk to what you are creating online then I could probably give more exact advice. Unfortunately it’s tricky to see your code in the image.

    You mean the link to my blog? It’s faildude.com

    Yes that’s it, thanks.

    Your issue is this:

    .post-entry-content {
    float: right;
    width: 390px;

    Your image is in a different div and the one your excerpt is in has the width set and a float.

    Now, you may want to change the files to have the text ‘wrap’ around the image. They’d have to be in the same container to do this.

    http://codex.wordpress.org/Function_Reference/the_excerpt shows what that function does by default which strips things like newlines and ‘html tags’. So, you may be better off having the_content (which keeps all of that) and just limiting the word count on that.

    Like this: http://wordpress.org/support/topic/show-only-the-first-30-words-in-the_content?replies=5

    I tried to understand what you’re saying but I couldn’t figure it out. I’m not familiar with things like this, so it’s useless.

    I would like you to give me more clues. Please? 🙂

    [No bumping, thank you.]

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Excerpt looking bad’ is closed to new replies.