New Topic

Make the_excerpt() clickable

Home › Forum › Customization › Make the_excerpt() clickable

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #360
    StartupWP
    Keymaster

    Try simply wrapping it with a link like so:

    <a href="<?php the_permalink(); ?>">
    <?php
    if(is_archive() || is_search() || is_home()){
    get_template_part('entry','summary');
    } else {
    get_template_part('entry','content');
    }
    ?>
    </a>

    #372
    skoosha
    Participant

    Unfortunately, it makes the entire excerpt as link and underlines it and after click leads to error.

    Hope i will stumble upon some solution somewhere.

    Thanks for your help!

    #376
    StartupWP
    Keymaster

    It worked just fine in our testing.

    For the underline, you could update this line:

    <a href="<?php the_permalink(); ?>">

    to:

    <a href="<?php the_permalink(); ?>" style="text-decoration:none !important">

    #381
    skoosha
    Participant

    Great, finally it worked!

    Probably messed up the code for a little when tried it for the first time.

    Thank you for your help, you got your self a new customer!

    #384
    StartupWP
    Keymaster

    Happy you got it working :).

Viewing 5 posts - 1 through 5 (of 5 total)
  • You must be logged in to reply to this topic.