customize custom fields filter search

Home Forums Product Support Forums Ajax Search Pro for WordPress Support customize custom fields filter search

This topic contains 5 replies, has 2 voices, and was last updated by Ernest Marcinko Ernest Marcinko 5 months, 1 week ago.

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #46487
    Keyconn
    Keyconn
    Participant

    Hello,

    We’re developing a job posting website and aiming to replicate the search functionality similar to Indeed. I’ve successfully created a search bar and implemented a custom field filter as a text input placed adjacent to the search bar. However, I’ve encountered limitations in customizing the filter, and I’m seeking guidance or tutorials for this purpose. Additionally, I’m interested in instructions or a guide to replicate the advanced search capabilities of Indeed. Please provide any relevant information or resources. In indeed, there is a vertical dash seperating both searches and they are still in the same bar. Is there any way to move the search bar next to the filter?

    Thank you

    #46492
    Ernest Marcinko
    Ernest Marcinko
    Keymaster

    Hi,

    The best way to custom position the search and the results is by using the search & results shortcodes. If you are using a page builder (or Gutenberg), then you can use it in any shortcode or custom HTML block. If not available you can still resort back to the shortcode builder.

    For custom field filters I recommend checking this documentation – it covers everything in details. In case you use taxonomy terms, then check out the taxonomy term guides.

    Best,
    Ernest Marcinko

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


    #46513
    Keyconn
    Keyconn
    Participant

    Hi Ernest,

    I used 2 search bars. one is for title and other is for city. I turned on the “Results information box” for both searches. It is not woking. when I search a text “software”. It is not showing “Results for Software” in the results page. I was looking at the previous support tickets and had no luck. Can you help me with that?

    Thank you

    #46515
    Ernest Marcinko
    Ernest Marcinko
    Keymaster

    Hi,

    It is not showing “Results for Software” in the results page

    Okay, it is not exactly what that feature does. The text on the results page cant’s be affected by the plugin unfortunately, it is usually changeable on the theme settings page – or on the page builder settings if you use any. Either of those have the control over that. Sometimes they are also programmatically changeable based on the query arguments.

    The results information box is to be used with the live search results container, for example: https://i.imgur.com/ABmJXLL.png

    Best,
    Ernest Marcinko

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


    #46520
    Keyconn
    Keyconn
    Participant

    Hello,

    Okay I got it now. Do you have any custom code which gives that feature? and I said I’m using 2 search bars but It is not searching both title and location at the same time. I know that they are independent. I tried to use location as a custom field filter but I was not able to customize the filter or add a theme to the filter like the search bar. Can you give suggestions on how to approach this? I want to be able to search job title and location like type in software in one search and location in another search and it should give results as “software jobs in Altoona”

    Thank you,
    Rohith.

    #46532
    Ernest Marcinko
    Ernest Marcinko
    Keymaster

    The easiest way is probably to make a child theme and customize the results page as you want it, but it very highly depends on how the theme is actually coded. Some themes are built up from the back-end, so you need some sort of an API to access the output, others are just hard coded so you can change anything in the template files.
    Because of that there is no generic approach as every single theme out there is different.

    Let’s say you can do it via a child theme. In the theme directory the search.php file is the template called when outputting the search results. Making modifications to that is the solution in that case. You need to find the part where the actual text is printed and add a conditional statement to check which of the search instances has been triggered and redirected to that page, for example:

    if ( isset($_GET['p_asid']) ) {
    	if ( $_GET['p_asid'] == 1 ) {
    		$text = "Text when results coming from search ID=1";
    	} else if ( $_GET['p_asid'] == 2 ) {
    		$text = "Text when results coming from search ID=2";
    	}
    }

    If you want to avoid coding alltogether, then as an alternative solution you could create custom results page via the results shortcode. Then the results information box is going to be shown as the live search results are used as sort of a results page.

    Best,
    Ernest Marcinko

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


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

You must be logged in to reply to this topic.