WordPress.org

Ready to get started?Download WordPress

Forums

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

  1. bwklein
    Member
    Posted 3 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.

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

  2. pgorski
    Member
    Posted 2 years ago #

    Bwklein,

    Thanks for the hack it solved my issue as well.

    Nice Job

    PG

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags