Home Forums General Issues Custom search query with ACF field values


Custom search query with ACF field values

  • Hello,
    I created a custom post type named "advertise_books" and taxonomy named "advertised-books".I used ACF plugin to add some fields to my custom post type. 
    Now i have to make a search query for my custom post type with a specific ACF field value. Please help me how it can be done.
    I found this solution for this, but confused about to use this.
    function action_function_name( $args ) {
    	echo '<input type="hidden" name="country" value="TEST_IF_THIS_EXISTS_IN_SAVE_POST"';
    add_action( 'acf/input/form_data', 'action_function_name', 10, 1 );

    Thanks n Regards,

    Yash Thakur`

Viewing 1 post (of 1 total)

You must be logged in to reply to this topic.