WordPress.org

Ready to get started?Download WordPress

Forums

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

  1. officethug
    Member
    Posted 1 year 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!

    http://wordpress.org/extend/plugins/list-category-posts/

  2. dangrgal
    Member
    Posted 1 year 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
    Member
    Posted 1 year 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:

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

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

  4. JonaStan
    Member
    Posted 1 year 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
    Member
    Posted 10 months 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

About this Topic