Viewing 13 replies - 1 through 13 (of 13 total)
  • Plugin Author TC.K

    (@wp_dummy)

    You can add hidden input of meta fields manually to the form by using action hook.

    add_action('uwpqsf_form_bottom', 'add_hidden_field');
    function add_hidden_field(){
    
    $html = '<input type="hidden" name="cmf[98][metakey]" value="meta_key1">';//define your meta key
    
    $html .= '<input type="hidden" name="cmf[98][compare]" value="1">';//compare refer to this ('1' => '=', '2' =>'!=', '3' =>'>', '4' =>'>=', '5' =>'<', '6' =>'<=', '7' =>'LIKE', '8' =>'NOT LIKE', '9' =>'IN', '10' =>'NOT IN', '11' =>'BETWEEN', '12' =>'NOT BETWEEN','13' => 'NOT EXISTS'), so 1 is =
    
    $html .= '<input type="hidden" name="cmf[98][value]" value="value1">';//the value for the meta
    
    //another meta field, noticed that the name number is now 99
    $html .= '<input type="hidden" name="cmf[99][metakey]" value="meta_key2">';
    $html .= '<input type="hidden" name="cmf[99][compare]" value="1">';
    $html .= '<input type="hidden" name="cmf[99][value]" value="value2">';
     echo $html;
    }

    Thread Starter Dr. SEO

    (@drseo)

    Hello TC.K!

    Thank you for quick reply!

    I try to use your code, and find that the problem is deeper, than (custom) meta fields.

    If I creating a new form in Result Setting and Others section I can check two options:

    Enabling string search

    This will add string search in the form. Note that when user using this to search, the taxonomy and custom meta filter that defined above will not be used. However, the search will still go through the post type defined above.

    Then I can check:

    Combine string search with filters above

    If I checking last one I have no search results anymore, as it was written in the quoted text.

    So my question is; can I combine the taxonomies and a string search somehow in a form?

    Kind regards,
    Jozsef

    Thread Starter Dr. SEO

    (@drseo)

    I try taxonomy filters with simple posts with post categories, and there is same (no) result like with custom types.

    Plugin Author TC.K

    (@wp_dummy)

    Beware of when using string search combined with filters as it is case sensitive.
    Note that the string search only look for title and content (not custom meta nor taxonomy), so if user enter typo (eg. wrong spelling) in the string search field, no results will be found.

    Thread Starter Dr. SEO

    (@drseo)

    I copypasted a title into search form to prevent wrong spelling, but still no results.

    Plugin Author TC.K

    (@wp_dummy)

    Also beware of the Apostrophe, it cannot be used for search as well.

    To test the string search is working, remove all the filters first and test only with the string search. If it is working, then the problem is on the filters.

    Thread Starter Dr. SEO

    (@drseo)

    The filters and the string search is working separately, but not when I try to combine them.

    Is it possible to check it on my website?

    Plugin Author TC.K

    (@wp_dummy)

    Do you use other plugin that will impact this plugin such as relavenssi. Try deactivate the plugin if you think will impact the search.

    Thread Starter Dr. SEO

    (@drseo)

    No other plugins installed. I try a fresh install WP and your plugins only. Do not works.

    Plugin Author TC.K

    (@wp_dummy)

    When using filters (for custom meta field or taxonomy) combined with string search, the string input is case sensitive.

    Also, can you give me your url?

    Thread Starter Dr. SEO

    (@drseo)

    Hi!

    I try to create a clean install test site for you, but there I cannot reproduce the issue.

    So possible the issue on my side or conflict with other plugins as you told.

    I will continue investigation, and will reopen topic if needed.

    Thank you for your cooperation!

    Kind regards,
    Jozsef

    HI LOVE THE PLUGIN
    i was wondering im doing a real estate website which has
    3 major categories
    buy
    rent
    vacation rental

    i have also 3 types of tax…
    location( ny, san Francisco, Florida….)
    price range(2,0000000….)
    type(villa, apartment….)
    i want to create
    when you choose lets say buy
    the location drop down shows only related location which are in buy category
    and the same goes to price range, and type

    is it possible

    thanks

    Plugin Author TC.K

    (@wp_dummy)

    @hakerdesign, please ask the question in other thread as your question is not related to this thread topic.

    For short answer, yes, but need deep customization, with js and ajax skill.

Viewing 13 replies - 1 through 13 (of 13 total)
  • The topic ‘Search in (custom) meta fields’ is closed to new replies.