attached file how can i make wp_query work to search for related names

hello everyone i don’t understand how to work my query for related words and so i look for “x” image for example i have 3 images let’s say one is called banner the other show and the second smaller one when write p shows a corresponding to that one which will be smaller and so here with others i leave my code

if (isset($_GET['search']) && !empty($_GET['search'])) {
        $value = $_GET['search'];
    if (isset($_GET['select']) && !empty($_GET['select'])) {
        $check = $_GET['select'];

$query_images_args = array(
            'post_type'      => 'attachment',
            'post_mime_type' =>  $check,
            'post_parent'    =>  $value,
            'compare'        => 'like',
            'post_status'    => 'inherit',

    $query_images = new WP_Query(  $query_images_args  );

Leave a Comment