Attached file how can i work the wp_query to search for related names


hello everyone I don’t understand how to make my query work for related words and so I look for “X” image for example I have 3 images let’s say one is called banner, another show and another small when writing p show the one related to that one that would be small and so with the others here 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  );

Moises Garcia 2 weeks 2022-11-15T00:06:20-05:00 0 Answers 0 views 0

Leave an answer