Post field: how to search items by a specific custom field and not by title?

Support General Post field: how to search items by a specific custom field and not by title?Resolved

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #42713
    hello@adame.io[email protected]
    Participant

    Or may be just search the title and all custom fields?

    Using just the title is very limiting as you will need to use keywords on the title to get a match. While, as a search, it should be broader and do the search in the post's content.

    In my use case, I have a post type as a links library, with the post title being the actual link, with extra information added as custom fields. And it will be hard to add links out of the title using the Post field.

    Any workaround to at least switch the search from targeting the title to a specific custom field on the post?

    #42717
    PeterPeter
    Moderator

    Hello,

    Before, the post field supported searching by title or content (keywords) as WordPress does and returns the post title. But it was confusing for users when they cannot find their posts if there are many posts. Then we only support searching the post by title.

    If you are familiar with coding, please try to use the filter hook rwmb_ajax_get_posts and take a look at the file wp-content/plugins/meta-box/inc/fields/post.php line 34.

    I hope that helps.

    #42720
    hello@adame.io[email protected]
    Participant

    @peter thanks. The filter helped 👍

Viewing 3 posts - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.