Skip to content

Instantly share code, notes, and snippets.

View jenniferhail's full-sized avatar

Jenn (Hail) Villavicencio jenniferhail

View GitHub Profile
@jenniferhail
jenniferhail / wp-tweaks.php
Last active October 22, 2019 13:19
Index layouts relationship fields for SearchWP
function my_searchwp_acf_relationship_processor( $customFieldValue, $customFieldName, $thePost ){
$content_to_index = '';
if ( 'partner_filter' == $customFieldName ) {
$partner_filter = $customFieldValue[0];
}
if ( 'post_type' == $customFieldName ) {
$post_type = $customFieldValue[0];
if ($post_type == 'post') {
// define the query here