• jeffmiller45

    (@jeffmiller45)


    Im basically wanting to add a link for the excerpt… the code im using is below.

    <?php if (is_home()) {
    the_excerpt();
    } elseif (is_single()) {
    the_content();
    } elseif (is_archive() || is_search()) {
    the_excerpt();
    }
    ?>

    I’ve tried adding href inside { and }, and it just prints the permalink.

    What code should i be using? thanks

Viewing 1 replies (of 1 total)
  • vtxyzzy

    (@vtxyzzy)

    The link needs to have some content to serve as the visual cue. Usually this is the title of the post. Try adding this line just ahead of the code you posted above:

    <p><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title_attribute(); ?>"><?php the_title(); ?></a></p>
Viewing 1 replies (of 1 total)
  • The topic ‘Php help – exerpt’ is closed to new replies.