WordPress.org

Ready to get started?Download WordPress

Forums

Yet Another Related Posts Plugin (YARPP)
When featured image is set html output is messed up (3 posts)

  1. googlebot
    Member
    Posted 9 months ago #

    I installed the plugin and I was trying to use the thumbnail display function, I noticed the html output is wrong when a post has a featured image set.

    this is how it looks when a post doest' have any featured image, the thumbnails displays the default default.png

    <div class="yarpp-thumbnails-horizontal">
    <a title="My post without featured image" href="http://www.mydomain.com/articles/no-featured-image/" class="yarpp-thumbnail">
    <span class="yarpp-thumbnail-default"><img src="http://www.mydomain.com/wp-content/plugins/yet-another-related-posts-plugin/default.png"></span>
    <span class="yarpp-thumbnail-title">My post without featured image</span>
    </a>

    and this is when a featured image is assigned to a post.

    <a title="This post has a featured image" href="http://www.mydomain.com/articles/has-featured-image/" class="yarpp-thumbnail"></a>
    <a title="This post has a featured image" href="http://www.mydomain.com/articles/has-featured-image/"><img width="120" height="120" alt="wine cork art tray" class="attachment-yarpp-thumbnail wp-post-image" src="http://www.mydomain.com/wp-content/uploads/2013/08/wine-cork-art-tray-120x120.jpg"></a>
    <span class="yarpp-thumbnail-title">This post has a featured image</span>
    </div>

    I also tried other YARPP templates but the same thing happens.

    So basically the Related posts are displayed all over the place instead of being neatly align, this is not a css problem.

    Here's a screenshot to show what's going on, left featured images, right none
    http://i.imgur.com/V4ets1j.png

    http://wordpress.org/plugins/yet-another-related-posts-plugin/

  2. jeffparker
    Member
    Plugin Author

    Posted 9 months ago #

    Your example showing a featured image has an empty link tag before a valid link tag. As a result, it's displaying an empty box, which then pushes the other content over.

    Any ideas why you are having two link tags for every post with a featured image? Can you deactivate other plugins to see if any are interfering? You might also deactivate and "delete" YARPP and reinstall it. The latest version (4.0.7) has clean uninstall that might clean up any problem data.

    Let me know if that fixes it.

  3. jeffparker
    Member
    Plugin Author

    Posted 4 months ago #

    Hi googlebot. I found another theme that seems to be displaying this same issue. Commenting out one line of code seems to fix the problem. What theme were you using when you reported this issue?

Reply

You must log in to post.

About this Plugin

About this Topic