This website uses cookies to personalize your experience. By using this website you agree to our cookie policy.

Taxonomy type request

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #53976

    Dear Ajax Search,

    My name is Juan Pedro. I’m contacting you because I need to resolve a technical issue regarding the plugin’s search.

    We want to create something similar to the job search engine that appears on this page: https://www.hiscox.es/

    It’s a job search engine that takes you to a page with a quote form, and we don’t want to create a separate page or article for each job, as that would be a waste of time and very expensive.

    Is there a way to include a list of 100 jobs (for example) and have them all land on the same page?

    I look forward to hearing from you. Kind regards.

    ——————————————————–

    Estimados señores de Ajax Search,

    Mi nombre es Juan Pedro, me pongo en contacto con ustedes por que necesito resolver una cuestión técnica con respecto a la busqueda en el plugin.

    Queremos crear algo similar al buscador de profesiones que aparece en esta página: https://www.hiscox.es/

    Es un buscador de profesiones que te lleva a una página con un formulario de cotización y no queremos crear una página o artículo por cada una de las profesiones ya que sería un trabajo inútil y muy costoso.

    ¿Hay alguna forma de meter un listado de 100 profesiones (por ejemplo) y que todas ellas aterricen en una misma página?

    Quedo a espera de respuesta. un cordial saludo

    #53980
    Ernest MarcinkoErnest Marcinko
    Keymaster

    Hi Juan Pedro,

    Sure! If I understand correctly, you want to redirect all of the results to the same page. For that you will need a small custom code snippet:

    add_filter( 'asp_results', 'asp_custom_link_results', 10, 4 );
    function asp_custom_link_results( $results, $search_id, $is_ajax, $args ) {
        // Replaces each result URL with this
        $replace_with = 'https://centuryseguros.es/page/url';
    
        // --- DO NOT CHANGE ANYTHING BELOW ---
        foreach ($results as $k=>&$r) {
    	if ( isset($r->link) ) {
                $r->link = $replace_with;
            }
        }
    
        return $results;
    }

    Just change the $replace_with variable on line 4 with the URL where you want to redirect the results. If you need help with it, let me know.

    Try adding this code via the Code Snippets plugin or to the functions.php file in your theme/child theme directory – make sure to have a full server back-up first for safety. For more details you can check the safe coding guidelines.

Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.