• Is there a way I can make a post on the front page display an excerpt if I enter one but not if I don’t and not limit the post to 55 characters. also I’d like a read more image to show on a post with an excerpt. I know about the <!–more–> tag and it doesn’t do exactly what I want.

    Edit: and yes I have looked at codex ??

Viewing 3 replies - 16 through 18 (of 18 total)
  • Moderator Samuel Wood (Otto)

    (@otto42)

    www.ads-software.com Admin

    Actually, that should not work. You’ve got the opening PHP happening twice without closing. Makes little sense to do <?php whatever ?> inside an echo statement.

    Using everything said here, this is what I did:

    <?php if(!empty($post->post_excerpt))
       {the_excerpt(); ?><div class="more"> <a href="<?php the_permalink() ?>" rel="bookmark" class="title">(more...)</a> </div>
       <?php
       } else {
       the_content();
      } ?>

    ——

    css
    .more{
    padding-right:20px;
    text-align:right;
    }

    ———

    If the excerpt is blank, it displays the whole post. Otherwise display the excerpt and add “more”. And you can still use the “more” tag in the edit window to cut the text anywhere you want.
    —————

    Please let me know if you see any problem I’m not seeing.
    Thank you.

    I am looking for some support on how to insert php coding into the excerpt in the admin. I would like to call for the php the title and date so I can insert it under an image in the excerpt instead of it showing up above. I don’t want to manually code it but would rather use php the_permalink. I can alter the loop to get rid of it showing up in front of the excerpt, but if I want to insert it somewhere in the_excerpt, it does not like php coding in the admin. Advice?

Viewing 3 replies - 16 through 18 (of 18 total)
  • The topic ‘excerpt stuff?’ is closed to new replies.