Forums

Posts 2 Posts
Search include relationships (4 posts)

  1. aaron@rossano.com.au
    Member
    Posted 5 months ago #

    Hi, does the built in WP function search through relationships?

    http://wordpress.org/extend/plugins/posts-to-posts/

  2. scribu
    Member
    Plugin Author

    Posted 5 months ago #

    Not sure what you mean. A relationship is just a bunch of numeric ids and a type. What would you search on?

  3. aaron@rossano.com.au
    Member
    Posted 5 months ago #

    Hi, thanks for responding.
    I mean if I have a custom post type 'person' and it's related to custom post type 'company'. Then searching through custom post type 'person' would bring back results if the keyword matches in the related company.
    I could do it manually by allowing multiple custom post types and then for every result that is not a person, I check it's relationship. But that would be extra work, thought maybe that could be automated as that would probably be useful functionality.

  4. scribu
    Member
    Plugin Author

    Posted 5 months ago #

    That can get messy pretty fast. You'll have to implement this functionality yourself, using the 'posts_search' filter.

Reply

You must log in to post.

About this Plugin

About this Topic