-
AuthorPosts
-
January 1, 2014 at 9:02 pm #204306
I make an shop oriented site and my question is : Can I make the search form in the header to display the products when pressing enter, I want the search results to be displayed as a shop products, not as posts.
January 1, 2014 at 10:14 pm #204317Hi nggrozev!
In WordPress dashboard please go to Appearance > Editor and open header.php file and add following line
<?php get_search_form(); ?>
If you would like to place it inside php tags, you should remove php tags from the code
Cheers!
YigitJanuary 2, 2014 at 1:42 am #204338Hi, I want to make the build in pop out search in the header to be used as a product search like the woocommerce product search for example, to be able to display the searched product in the shop. Is this possible ? And still to keep the predictive functionality.
Thank you in advance!
January 2, 2014 at 3:49 am #204368Hi!
If you want the search to only show Products in the search results, open functions-enfold.php, replace line 93:
$defaults = array('numberposts' => 5, 'post_type' => 'any', 'post_status' => 'publish', 'post_password' => '', 'suppress_filters' => false);
By this:
$defaults = array('numberposts' => 5, 'post_type' => 'product', 'post_status' => 'publish', 'post_password' => '', 'suppress_filters' => false);
Best regards,
JosueJanuary 2, 2014 at 12:53 pm #204469Ok, the search shows just products now, but the end result of the search it is still post like content, I want when you press the search icon after typing the name of product or press enter to sort the product in the shop with the image the cart button and so on, not as posts.
Thank you in advance guys!
Best wishes.January 2, 2014 at 5:41 pm #204546Hello!
It is possible but that customization is beyond the scope of the support we can offer. If you really need it try hiring a freelancer for the job or if you prefer request a quote here.
Also, you can request it here: https://kriesi.at/support/topic/enfold-feature-requests/
Cheers!
JosueJanuary 3, 2014 at 5:52 pm #205046I have one final question about the search. Is it possible at least to have the search results with pictures or thumbnails not just the numbers and text?
Best wishes!
NickJanuary 3, 2014 at 7:38 pm #205106 -
AuthorPosts
- The topic ‘Search form on the header’ is closed to new replies.