WordPress.org

Ready to get started?Download WordPress

Forums

Relative Posts
[resolved] Please consider... (3 posts)

  1. amommy
    Member
    Posted 1 year ago #

    I had a problem with the images heights being larger than the line height. Also had a problem with posts that had long names, over 100 characters. I have made modifications to the plugin and HOPE that they may be implemented in future updates.
    the changes I made
    added style="height:50px" to the div at line 97
    <a href="'.get_permalink().'">'.'<div style="height:50px">'.$image
    (will probably add this to the css instead .relative-post-thumbnail div {height:50px})

    to fix the title issue had to do a little more
    added
    $posttitle = strlen(get_the_title()) > 110 ? substr(get_the_title(), 0, strpos(get_the_title(),' ',100))."...":get_the_title();

    above each $relative .=

    and then replaced all get_the_title() with $posttitle
    so for the first one (with thumb)
    <a href="'.get_permalink().'">'.'<div style="height:50px">'.$image. $posttitle;'</div></a>

    and the second one
    <a href="'.get_permalink().'">'.$posttitle;'</a>

    Thanks for a very helpful widget :)

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

  2. amommy
    Member
    Posted 1 year ago #

    Another problem I ran into was when a post was in a category by itself there was no fall back and therefore got an error for the foreach $terms
    For now I just added

    if($terms == false)
    return false;

    in line 79 under $terms =
    the above returns nothing whcih isn't really ideal, but it's a good temporary solution.
    Maybe a fall back category chosen in the admin section for this kind of error

    tested with default post in uncategorized.

  3. Panagiotis Angelidis
    Member
    Plugin Author

    Posted 1 year ago #

    With last update I fixed all the issue you report. Thanks for the feedback ;)

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic