Forums

[WP Favorite Posts] Truncate Titles in Widget? (2 posts)

  1. justbishop
    Member
    Posted 2 years ago #

    Awesome plugin, perfect for my purposes!

    I just want to truncate the post titles in the sidebar widget so they each only take up one line :)

  2. justbishop
    Member
    Posted 2 years ago #

    Just wanted to add that I've read THIS thread (which I found very useful for shortening the post titles on my index.php), and understand how to create a new function and call it into a template tag, but the code in the wp-favorite-posts.php for the widget output isn't in template tag form. If someone could help me call a function into the following line, that would do nicely!

    echo "<a href='".get_permalink($o->post_id)."' title='". $p->post_title ."'>" . $p->post_title . "</a> ($o->meta_value)";

    I tried replacing "post_title" with the name of my function, but that just made the titles completely disappear.

Topic Closed

This topic has been closed to new replies.

About this Topic