exclude particular category in api

I just figured it out, just in case it might be helpful for anyone in future: There is an option available to exclude a particular category – categories_exclude So, the new rest API would be: https://www.example.com/?rest_route=/wp/v2/posts&per_page=100&categories_exclude=10

Search results for ACF data

This worked for me: <?php if($_GET[‘module_search’] && !empty($_GET[‘module_search’])) $keywords = $_GET[‘module_search’]; ?> <!– Set args for search of cpt –> <?php $args = array( ‘post_type’ => ‘lectures’, ‘order’ => ‘ASC’, ‘posts_per_page’ => -1, ‘meta_query’ => array( ‘relation’ => ‘OR’, array( ‘key’ => ‘keywords’, // name of custom field ‘value’ => ‘[[:<:]]’.$keywords.'[[:>:]]’, // matches exaclty “123”, … Read more