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 log that already has hundreds of thousands,
WordPress-Related log plug-in: 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 them slowly, however, for a log that already has hundreds of thousands of logs, if you really need the relevant log to show only images without the need to use the title type, you can customize the fields one by one, so the time is not long enough, tired and 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/