Network Latest Posts
[resolved] Custom fallback thumbnail (2 posts)

  1. ihavetoomany
    Posted 3 years ago #

    Maybe I missed something...but how would I go about adding my own custom thumbnail to posts that do not have one?


  2. Jose Luis SAYAGO
    Plugin Author

    Posted 3 years ago #


    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.


Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Network Latest Posts
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic


No tags yet.