I am currently getting custom terms by wp function get_terms(). But issue is that I want to get terms with this condition. where name LIKE '%sometext%' OR description LIKE '%sometext%' It is pretty simple in core php but how to achive taht in WP
This what i have tried
$page = ( get_query_var('page') ) ? get_query_var( 'page' ) : 1;
$page_size = 20;
$taxonomy = 'taxonomy_journal_name';
$offset = ( $page-1 ) * $page_size;
$variable = get_terms($arrayName = array(
'taxonomy' => $taxonomy,
'parent' => '0',
'orderby' => 'name' ,
'hide_empty' => false,
'order' => 'ASC',
'number' => $page_size,
'offset' => $offset,
'name__like'=> $_REQUEST['query'],
'description__like' => $_REQUEST['query']
));