Support » Plugins and Hacks » [Resolved] [Plugin: Network Latest Posts] Custom fallback thumbnail

[Resolved] [Plugin: Network Latest Posts] Custom fallback thumbnail

Viewing 1 replies (of 1 total)
  • Plugin Author Jose Luis SAYAGO



    You could use the thumbnail_filler parameter to display a placeholder when thumbnails have not been set, check out this example: Thumbnails with Placeholders

    Nonetheless, you can’t display personalized placeholders, right now your options are: placeholder (by default), kittens and puppies.

    Of course if you want your posts to display a thumbnail you have to set a featured image when you’re editing a post.

    Finally if you want to edit the code to add your own placeholder provider, you could find and replace these lines:

    // Placeholder provided by Placehold.it
    case 'placeholder':
         echo "<a href='".$all_permalinks[$field->guid]."'><img src='http://placehold.it/".$thumbnail_wh."&text=".$field->post_title."' alt='".$field->post_title."' title='".$field->post_title."' /></a>";
    // Just for fun Kittens thanks to PlaceKitten
    case 'kittens':
         echo "<a href='".$all_permalinks[$field->guid]."'><img src='http://placekitten.com/".$thumbnail_size[0]."/".$thumbnail_size[1]."' alt='".$field->post_title."' title='".$field->post_title."' /></a>";
    // More fun Puppies thanks to PlaceDog
    case 'puppies':
         echo "<a href='".$all_permalinks[$field->guid]."'><img src='http://placedog.com/".$thumbnail_size[0]."/".$thumbnail_size[1]."' alt='".$field->post_title."' title='".$field->post_title."' /></a>";

    Just remember if you make changes to the code they will be erased when updating to a new version.


Viewing 1 replies (of 1 total)
  • The topic ‘[Resolved] [Plugin: Network Latest Posts] Custom fallback thumbnail’ is closed to new replies.