• Resolved amommy

    (@amommy)


    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/

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter amommy

    (@amommy)

    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.

    Plugin Author Panagiotis Angelidis

    (@paaggeli)

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

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Please consider…’ is closed to new replies.