• Resolved moniaros

    (@moniaros)


    Hello,
    Is it possible to filter by post title ( “title”:{“rendered”:”post-title”} )?

    i try with: ?filter[meta_key]=title&filter[meta_value]=post-title and i get a empty response []

    Thank you in advance.

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author sk8tech

    (@sk8tech)

    Hi @moniaros, thank you for your message.

    I assume that the ‘title’ you referred to is the default ‘title’ from ‘Post’, or a Custom Post Type. Given that, you can easily filter by ‘title’ field using the ‘search’ field from native WP REST API.

    To make things more clear, you cannot use native rest API to search SPECIFICALLY by title.

    Yes, using ?search=foo will search in the title, but it will also search in everywhere else.

    So it’s not really a solution if you want to search ONLY by title.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘How can i filter based on a title?’ is closed to new replies.