List category posts
posts_morelink doesn't work with a custom template (5 posts)

  1. officethug
    Posted 2 years ago #

    I am trying to utilize the posts_morelink shortcode on a page referencing a custom template and the more link does not display. I tested this by using a custom template that is identical to the default template and it still does not display. So it has nothing to do with the contents of the custom template. Please help!


  2. dangrgal
    Posted 2 years ago #

    I'm having a similar problem with both the posts_morelink and morelink. Neither are working. I am using a custom template and version 0.30.3 of the plugin.

  3. dangrgal
    Posted 2 years ago #

    Actually, I figured part of it out. I've been using this plugin since before this option was added and hadn't updated my custom template.

    Adding this code to my custom template adds it to every item:

    $lcp_display_output .= 'ID).'">Read more';

    However, it doesn't fix the issue with the shortcodes not working.

  4. JonaStan
    Posted 2 years ago #

    I couldn't find anything on this either.
    However, Dangrgals solution didn't work for me but sent me in the right direction.

    $lcp_display_output .= '<a href="';
    $lcp_display_output .= get_permalink($single->ID);
    $lcp_display_output .= '">Read more...</a>';

    The above code will provide you with a correct link for each and every post. It's not neat, but it works.

  5. Eric3D
    Posted 1 year ago #

    That works. You can combine it into one line if you prefer.

    $lcp_display_output .= '<a href="' . get_permalink($single->ID) . '">Read more...</a>';

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • List category posts
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic