• Resolved Maho1569

    (@maho1569)


    I use Custom Layouts to style this search result list. The read button in the excerpt is part of my theme. Normally it links to the post as it should (see tag cloud lists). But with Custom Layouts it links to the main page. Is there a possibility to make the link work normally?

    My alternative is to find out, how I can hide the read more button made by my theme in Custom Layouts (but only there, I need it in other places) and add a button in my custom layout template.

    Thanks for suggestions in advance!

    Marlene

    The page I need help with: [log in to see the link]

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author Code Amp

    (@codeamp)

    Hey Marlene

    Glad you solved your other ticket, I have noticed some odd behaviour with this, I’ll look into today/tomorrow and get back to you, hopefully with some options ??

    Best

    • This reply was modified 3 years, 11 months ago by Code Amp.
    Thread Starter Maho1569

    (@maho1569)

    Thanks a lot!!

    Plugin Author Code Amp

    (@codeamp)

    Hey Marlene

    I’ve checked this out and can see what’s going on.

    Our loops don’t use the traditional loop for posts (we do this for speed, and caching) eg:

    if ( have_posts() ) {
        while ( have_posts() ) {
     
            the_post(); ?>
     
            <h2><?php the_title(); ?></h2>
     
            <?php the_content(); ?>
     
        <?php }
    }

    Which might mean the way they get the the_permalink() might not actually work when used in our functions… so the link always goes to the current URL…

    I’ve actually gone ahead and disabled this text for excerpts in our plugin (so this link is never shown) – it was never intended to be there (and we have a link element anyway).

    The update with the removal of this should be released by the end of the week.

    Best

    Thread Starter Maho1569

    (@maho1569)

    Hi, thanks a lot for having a look at this. I now installed version 1.4.0, but the excerpt still links to the current page. But maybe this is my theme’s fault now?
    An alternative to solve my problem (tag archive pages shown by the tag cloud and post lists don’t look alike) would be to apply the custom layouts template to tag archive pages. Do you know if this is a possible alternative?

    Thanks a lot in advance!!!

    Plugin Author Code Amp

    (@codeamp)

    Hey @maho1569

    I think we got confused – 1.4.0 was released just before I mentioned making changes – so it wasn’t in there!

    However, I’ve just release 1.4.1, and these fixes are in there.

    I decided to do a bit of a u-turn, and I kept the theme functionality of adding “read more” text (and fixed the link), but I also added an option to disable it, from the excerpt element in our plugin ??

    Let me know how you get on.

    Best
    – Ross

    • This reply was modified 3 years, 10 months ago by Code Amp.
Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Excerpt not linking to post’ is closed to new replies.