Site icon Hip-Hop Website Design and Development

The right way to search by means of "post title" and "tags" utilizing WP_Query?

In my customized search kind, i am at present utilizing these form of $args with my WP Question:

$args = array(

    'post_type'   => 'put up',
    'posts_per_page'  => $postsPerPage,
    'offset'          => $postOffset,
    'class'        => 42,
    's'               => $title, //worth of my searched time period
    'orderby'         => 'date',
    'order'           => 'DESC',

);

I want to search a put up by “title” OR by “tag”.

I’ve tried utilizing this code:

$query_args = array(

'post_type' => 'put up',

'post_status' => 'publish',

'order' => 'ASC',

'orderby' => 'none',

'posts_per_page' => '100',

'offset' => '2',

'web page' => '2',

'tax_query' => array(

    '0' => array(

        'taxonomy' => 'post_tag',

        'discipline' => 'title',

        'phrases' => array('take a look at'),

        'operator' => 'IN',

    ),

    'relation' => 'OR',

),

'meta_query' => array(

    '0' => array(

        'key' => 'post_title',

        'worth' => 'take a look at',

        'examine' => 'LIKE',

    ),

    'relation' => 'OR',

),

however the result’s empty.

Thanks!