list-posts WordPress Plugin
Open tags, breaking pages (2 posts)

  1. bwklein
    Posted 5 years ago #

    After adding the shortcode to my page, I noticed that my layout was broken. I tracked the problem down to some open paragraph tags in the substring content on some of my posts. To fix it, I added the strip_tags function around line 300 to remove everything but links from the content that is written to the list.

    if ( $stpos )
        $content['extended'] = strip_tags( substr( $content['main'], $stpos ), '<a>' );
        $content['main'] = strip_tags( substr ( $content['main'], 0, $stpos ), '<a>' );

    It seemed to fix my problem with layout, but feels a bit hackish.
    I have a test page that we can play with if you want me to try other solutions.

    Thanks for the plug-in, it took me a little time to alter the code like I wanted, but saved me a lot of time making the list.


  2. pgorski
    Posted 4 years ago #


    Thanks for the hack it solved my issue as well.

    Nice Job


Topic Closed

This topic has been closed to new replies.

About this Plugin

  • list-posts WordPress Plugin
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic