• Hello I am just about done designing my blog, everything seems to be working fine with the blog except the layout changes when i add “<!–more–>” in the post. Without “<!–more–>” the layout goes back to normal, but this leaves me with no way to display excerpts.

    I also keep reading posts about replacing “the_content” with “the_excerpt”, i am just not getting that at all. In which file is this done? index.php? Either way, i’m not sure if that is going to fix my problem, because the layout changes.

    Oh and the “<!–more–>” link works, it just changes the layout. Any help would be greatly appreciated.

    -C

Viewing 15 replies - 1 through 15 (of 23 total)
  • Well, it doesn’t change the layout for us… so a link would be most beneficial to see what’s going on.

    You change the_content to the_excerpt in your theme’s index.php file.

    Thread Starter volcano

    (@volcano)

    Sorry it’s hard to show b/c i can either add the tag to a post and it will mess up the layout. Or i can not add it and everything will look normal.

    this is the code i have:

    <?php if (is_search()) { ?>
    <?php the_excerpt() ?>
    <?php } else { ?>
    <?php the_content(__(‘Read more …’)); ?>
    <?php } ?>

    The code is not layout.
    Add the tag and leave it there for 5-10 minutes until helpers can see it. If not, nobody can guess what is it what you call “messed up layout”.

    And we need a link too.

    Another thing to keep in mind is *where* you are adding the the <!--more--> tag. It’s quite possible that if it’s inside a <p>, that it’s leaving an open block level element, thus breaking the design.

    Thread Starter volcano

    (@volcano)

    Ok i added it. When it’s not added the “Keyword/Archive menu” that you will now find at the very bottom, is aligned to the right, and vertically even with the first post’s image. Also without the <!–more–>, the white burst with lips in the middle of it, that you will now find in the bottom right, is normally hovering over the top righthand corner of the Keyword/Archive menu.

    the link is: http://www.whitevolcano.com

    As I mentioned, for one reason or another, you are not getting a closing </div> .postentrycopy are you manually adding that to your post or is it in your template?

    Thread Starter volcano

    (@volcano)

    i’m adding that manually in the post, but i have a </div> when i enter it. This is what i entered in the post for the first one:

    <div class=”postentrycopy”>
    That’s 2.2 degrees warmer than average and 0.07 degree warmer than 1998, the previous warmest year on record. (Watch how the heat’s got cherry trees blooming in D.C. and New Yorkers going shirtless Video)<!–more–>
    <br>
    Worldwide, the agency said, it was the sixth warmest year on record.
    <br>
    In December the Center had predicted that 2006 would be the United States’ third warmest year, but unusual readings later that month pushed the year into first place.
    </div>

    The more tag is not respecting the closing div. You will need to close the .postentrycopy, then add it again after the more tag, and close it again.

    My suggestion would be to add some CSS to to .postentry p instead of creating postentrycopy.

    Seems it would do the same thing.

    Thread Starter volcano

    (@volcano)

    Nice! That worked – thank you so much. I did it by closing the div before the more tag and then starting it after again.

    I’m not sure i understand your second paragraph. How would i go about doing this?
    This is what i got for the postentrycopy CSS:

    .postentrycopy {
    margin: 9px;
    }

    From a brief glance at your CSS, you could simply eliminate your .postentrycopy and use .postentry p . That way, you do not have to manually create the div, nor worry about closing/reopening.

    I have to agree very much with miklb: the whole idea of using a cms/blogging tool is to avoiod adding html tags for every post – the whole formatting should be done prior to blogging in the stylesheet.

    Thread Starter volcano

    (@volcano)

    I just tried that, it didn’t work. The problem with the template i’m working off is, the .postentry contains the image and the copy underneath it, and i want to have the copy underneath to have a 9px margin on the left and right, hence the .postentrycopy value.

    I’m not sure how to make this all work. It would be awesome not to have to enter all that code during every post. Frustrating b/c this is the very last thing i have left to do on it.

    Thread Starter volcano

    (@volcano)

    oh and if i get rid of .postentrycopy and try to add the margin to the .postentry values, the image moves with it because they are defined in the same div.

Viewing 15 replies - 1 through 15 (of 23 total)

The topic ‘‘more’ tag changing layout’ is closed to new replies.