I'm using the WP REST API v2 to try and search for all posts with the same title, what I'm trying to do is create a sort of head-to-head/previous meetings page for 2 teams.

At the moment i can retrieve a single post with a slug no problem


When i use a search it retrieves all the events with team1 and team2, but also all references to team1 & 2 from post content which is not what I want...


How do i retrieve a post using the search using the exact post title as shown below in title > rendered ??

  id    60455
  date  "2016-11-22T19:30:00"
  date_gmt  "2016-11-22T19:30:00"
  modified  "2016-11-23T09:25:29"
  modified_gmt  "2016-11-23T07:25:29"
  slug  "team1-vs-team2"
  status    "publish"
  type  "sp_event"
  link  ".../event/team1-vs-team2/"
      rendered  "Team1 vs Team2"

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.