WordPress-related log plug-ins: WordPressRelatedPosts, which is also a plug-in made by boiled fish. one function can display thumbnails through custom fields. for a new blog, you can add them slowly, however, for a WordPress-Related log plug-in that already has hundreds of thousands of logs: WordPress Related Posts, which is also a plug-in made by boiled fish, one function can display thumbnails through custom fields, for a new blog, you can add it slowly, but for a log that already has hundreds of thousands, if you really need the relevant log to show only the image, instead of the title type, at this time, you can modify the fields one by one. it takes a long time and is exhausted. I thought of the modification. after the modification based on the source code, everything works normally. As for whether it is beautiful or not, you need to modify it yourself. after all, you need to modify PHP and design it well.
Defaults to _s.jpg
It is applicable not only to flickr, but also to some large websites. the built-in image library of wordpress can also be used. However, you need to manually modify the code to replace the suffix.
Note:
Just a few small changes. The plug-in source code comes from boiled fish.
You do not need to check Related Posts with Thumbnail for plug-in settings.
: Related logs show thumbnail only plug-in: http://www.yisougou.com/download/relatedpost-only-display-first-images.rar
Where you may need to change:
$ Content = $ related_post-> post_content;
Preg_match_all ('| I', $ related_post-> post_content, $ matches );
$ Img_src = $ matches [1] [0]; // first photo
If (eregi ("flickr.com", $ img_src )){
$ Img_url = str_replace (". jpg", "_s.jpg", $ img_src );
} Else {
$ Img_url = $ img_src;
}
You can set how to replace the image suffix. the above only captures the first image of each article.
And
$ Output. = 'id). '"title ="'. wptexturize ($ related_post-> post_title). '"> ';
You can set the image display format as shown in the preceding figure.
Effect reference address: http://www.babyshoot.cn/2010/01/22/dreaming-of-forever.html
In this way, you do not need to modify the thumbnail image address of the custom field in each article.
Source code: http://fairyfish.net/2007/09/12/wordpress-23-related-posts-plugin/