Search functionalities

This topic contains 6 replies, has 2 voices, and was last updated by Ernest Marcinko Ernest Marcinko 6 months, 4 weeks ago.

Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #37004
    spinoWeb
    spinoWeb
    Participant

    As you see on the website there is a blue bar with a tab.
    Each tab has a search box.
    The 1st one (tab IMMOBILI), searches in custom fields of a CPT named Immobili .
    The 2nd one (tab CODICE), searches in the custom field ‘code’ of a CPT named Immobili.

    I have some questions:

    1- 1st search box (tab IMMOBILI):
    1.1- in all the fields i put the “||Any value**” as first value (img 01). But after the first search, in the result page, if i click on the select, the “||Any value**” is not showing anymore (img 02). How can i always show it?
    1.2 – How can i get the values searched to show them in the page (img 04) and eventualy in the browser title? In the secon tab search (tab CODICE) which uses the std input field the browser title show the search value automaticaly and in the page i use <?php echo esc_html( get_search_query( false ) ); ?>

    2- search button function:
    2.1. i’d like the 2 search box be indipentendent. Now the search button considers also the choises in the other tab (img 03)

    I’m writing to you because i couldn’t find theese things in documantation.

    Thanks

    • This topic was modified 7 months ago by spinoWeb .
    Attachments:
    You must be logged in to view attached files.
    #37010
    spinoWeb
    spinoWeb
    Participant
    You cannot access this content.
    #37015
    Ernest Marcinko
    Ernest Marcinko
    Keymaster

    Hi,

    1. That looks like some form of a bug to me, but I can’t replicate it on our local servers. Can you please add temporary (s)FTP access? I would like to debug this directly.
    1.2 – Well, you need the $_GET query variable for that. That information is sent via the URL. For example if I select the “Casa signola”, then it is sent like this: https://i.imgur.com/eTJakc0.png
    That value can be accessed via the $_GET['aspf']['tipologia__1'] variable.

    2. The two search bars are considered independent from one another. The only thing that is shared is the search phrase on the results page, because that is a global query variable in WordPress.

    Best,
    Ernest Marcinko

    If you like my products, don't forget to rate them on codecanyon :)


    #37018
    spinoWeb
    spinoWeb
    Participant
    You cannot access this content.
    #37029
    Ernest Marcinko
    Ernest Marcinko
    Keymaster

    Thanks!

    I think I hafe found the problem. It is actually the fancy select2 script causing the problem, it does not allow empty values into the drop-downs unless they are selected by default. I managed to resolve the issue by bypassing it, so it should be okay now.
    I made direct changes on the plugin code, I will make sure to add this change to the upcoming release, so you don’t have to worry about it anymore.

    Best,
    Ernest Marcinko

    If you like my products, don't forget to rate them on codecanyon :)


    #37061
    spinoWeb
    spinoWeb
    Participant

    It works now.

    Thanks

    #37091
    Ernest Marcinko
    Ernest Marcinko
    Keymaster
    You cannot access this content. Best,
    Ernest Marcinko

    If you like my products, don't forget to rate them on codecanyon :)


Viewing 7 posts - 1 through 7 (of 7 total)

You must be logged in to reply to this topic.