Tuesday, November 15, 2022
HomeWordPress DevelopmentConnected file how am i able to work the wp_query to seek...

Connected file how am i able to work the wp_query to seek for associated names


hi there everybody I do not perceive find out how to make my question work for associated phrases and so I search for “X” picture for instance I’ve 3 photos to illustrate one is named banner, one other present and one other small when writing p present the one associated to that one that might be small and so with the others right here I go away my code

if (isset($_GET['search']) && !empty($_GET['search'])) {
        $worth = $_GET['search'];
    }
    
    if (isset($_GET['select']) && !empty($_GET['select'])) {
        $test = $_GET['select'];
    }

$query_images_args = array(
            'post_type'      => 'attachment',
            'post_mime_type' =>  $test,
            'post_parent'    =>  $worth,
            'examine'        => 'like',
            'post_status'    => 'inherit',
        ); 

    $query_images = new WP_Query(  $query_images_args  );

RELATED ARTICLES

LEAVE A REPLY

Please enter your comment!
Please enter your name here

- Advertisment -
Google search engine

Most Popular

Recent Comments