WordPress.org

Ready to get started?Download WordPress

Forums

Yet Another Related Posts Plugin (YARPP)
[resolved] [Plugin: Yet Another Related Posts Plugin] Finding related images (6 posts)

  1. Luke Gedeon
    Member
    Posted 1 year ago #

    I have an interesting problem, and wondered if you had any insight on how to attack it.

    I have a bunch of tagged images, and a whole bunch of posts coming in. As each post comes in, I would like to pair the post with a related image based on the content of the post and the tags on the images.

    I started using and loved YARPP many years ago, and immediately thought of it when this problem came up. I was wondering if you had any insight on how to make sure I get a good match.

    My thinking so far is to toss out low value words (the, a, an, and, of, etc.) then go through the rest of the words and find which ones match tags I have used, but that does not seem like it would give the best match. I would need some way of measuring relevance.

    I also have the possibility of the image being tagged "trees" and the post mentioning forest, but I can just tag better, unless there is a dictionary I can work against to make these associations.

    I will be grateful for any related code to learn from, other suggested reading, or general thoughts you can provide.

    http://wordpress.org/extend/plugins/yet-another-related-posts-plugin/

  2. mitcho (Michael Yoshitaka Erlewine)
    Member
    Plugin Author

    Posted 1 year ago #

    It sounds like you generally want to use YARPP. ;)

    But I think you're asking more specifically, how to get *images* to be related to other things, particularly as they have to body text. The best I can suggest is to make sure you have relevant keywords in the title, or to use adequate tags.

    If tagging your posts is more of the issue, I believe there are some plugins out there that will suggest tags or even automatically add tags for you. It might help you to use something like that for a while to build up your base of tags.

    Hope that helps! :)

  3. Luke Gedeon
    Member
    Posted 1 year ago #

    The images are very heavily tagged so we have plenty of semantic info to work with on the image side.

    The posts are not typically tagged, or at least not well. So I would have to go on post content.

    So I guess the question is: If I am looking at a new post is there as function inside YARPP, that I can call (or copy and modify) that would help me find an image based on image-tags that is a good match for that new post?

    The difference being that I am looking for a related image instead of a related post.

  4. mitcho (Michael Yoshitaka Erlewine)
    Member
    Plugin Author

    Posted 1 year ago #

    YARPP should work out of the box for images as well as posts, but there may be a little extra work to do in order to get this to show up. Specifically, how are your images handled? Are they posts like everything else, or are they in the Media Library, or are you using some special plugin? If they're in the Media Library, how are you tagging them>

  5. Luke Gedeon
    Member
    Posted 1 year ago #

    They are in the Media Library, which creates an attachment-post-type post for each image. So we are tagging the attachment post by adding a field to the media uploader.

  6. mitcho (Michael Yoshitaka Erlewine)
    Member
    Plugin Author

    Posted 1 year ago #

    I see. And I assume the "tags" you're adding to the attachments are using the regular WordPress-standard post_tag terms.

    If so, you should be able to do this easily using YARPP's custom post type support, though it may require some custom code. Check out the "other notes" section of the readme which will tell you about the custom post type support.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags