PHP code example of masonitedoors / searchwp-api-route

1. Go to this page and download the library: Download masonitedoors/searchwp-api-route library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

masonitedoors / searchwp-api-route example snippets


'meta_query' => array (
  'relation' => 'AND',
  array (
    'key' => 'jedi',
    'value' => 'luke',
    'compare' => 'IN',
  ),
  array (
    'key' => 'sith',
    'value' => 'vader',
    'compare' => 'IN',
  ),
)

'meta_query' => array (
  'relation' => 'OR',
  array (
    'key' => 'jedi',
    'value' => 'luke',
    'compare' => 'IN',
  ),

  array (
    'key' => 'sith',
    'value' => 'vader',
    'compare' => 'NOT IN',
  ),
)

array (
  'relation' => 'AND',
  array (
    'key' => 'jedi',
    'value' => array ('luke', 'obi-wan' ),
    'compare' => 'IN',
  ),
  array (
    'key' => 'sith',
    'value' => 'vader',
    'compare' => 'NOT IN',
  ),
)