Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #966913

    Hi,
    I am quite happy with the following code inside my searchform.php (child theme), because I just get the search results from my product.
    I got this from another topic in this forum.

    <?php 
    
    global $avia_config; 
    
    //allows you to modify the search parameters. for example bbpress search_id needs to be 'bbp_search' instead of 's'. you can also deactivate ajax search by setting ajax_disable to true
    $search_params = apply_filters('avf_frontend_search_form_param', array(
    	
    	'placeholder'  	=> __('Produktsuche','avia_framework'),
    	'search_id'	   	=> 's',
    	'form_action'	=> home_url( '/' ),
    	'ajax_disable'	=> false
    ));
    
    $disable_ajax = $search_params['ajax_disable'] == false ? "" : "av_disable_ajax_search";
    
    $icon  = av_icon_char('search');
    $class = av_icon_class('search');
    ?>
    <form role="search" method="get" id="searchform" action="<?php echo home_url( '/' ); ?>">
    			<div>
    				<label class="screen-reader-text" for="s">Search for:</label>
    				<input type="text"  name="s" id="s" placeholder='<?php echo $search_params['placeholder']; ?>' />
    				<input type="submit" id="searchsubmit" value="<?php echo $icon; ?>" class="button <?php echo $class; ?>" />
    				<input type="hidden" name="post_type" value="product">
    			</div>
    </form>

    Now the question: Can the keywords been easily included to the search result? (e.g. I just have one keyword which is a synonymy of the product.)

    Thanks in advance!
    JP

    #968041

    Hey Jan,

    Unfortunately, it would require quite some time and customization of the theme to achieve this, so I am sorry to tell you that this is not covered by our support. However, if it’s really important for you to get this done, you can always hire a freelancer to do the job for you :)

    Best regards,
    Basilis

    #971558

    Hi,

    Thanks for this answer. Unfortunately I am on my way using a plugin for this now.

    Br
    JP

    #972057

    Hi JP,

    Thanks for the feedback and best of luck with the plugin. Please let us know if you should need any further help on the topic or if we can close it.

    Best regards,
    Rikard

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