Have been searching for the last hour for examples, but can’t find anything, either here or on the web.
I want to create a simple field for storing ID numbers, then pull that data into the functions.php file in our theme. We need to manually block certain posts from showing up in various search functions in our theme and are currently adding these manually into the functions file in two places. Ideally I’d create a simple text field in the options section, then pull that data into functions.php so that we don’t need to update that file every time we have to block a post from search:
add_filter( 'buddyboss_theme_lms_ajax_get_courses_args', 'bb_remove_course_from_search' );
function bb_remove_course_from_search( $args ) {
$args['post__not_in'] = array(267299,267163, 265274,261667,261589,261000,260905,260855,275414,273036);
return $args;
}
I tried putting a get_field in the array above, but it crashed the site.
Sound possible?