-
AuthorPosts
-
June 27, 2017 at 1:32 am #813273
Hello Sirs,
Thank You for your great support!
Could you help me, if that easy for you to the following search results page customization?
1. add price to search results page
2. add sku to search results page
3. how to edit the sidebar of search results page?Thank You in advance.
Best regards,
NickJune 27, 2017 at 11:25 pm #813637Hey nickgin,
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 its really important for you to get this done, you can always hire a freelancer to do the job for you :)
Best regards,
BasilisJune 27, 2017 at 11:47 pm #813642An actual answer for you
Use Relevanssi in search instead of the default searchDecember 3, 2013/in PHP Snippets /by Devin/Last Updated: January 18, 2014
If you are using Relevanssi for your WordPress searches you can have the theme use it as well for the non-standard search forms that the theme generates.add_filter(‘avf_ajax_search_function’, ‘avia_init_relevanssi’, 10, 4);
function avia_init_relevanssi($function_name, $search_query, $search_parameters, $defaults)
{
$function_name = ‘avia_relevanssi_search’;
return $function_name;
}function avia_relevanssi_search($search_query, $search_parameters, $defaults)
{
global $query;
$tempquery = $query;
if(empty($tempquery)) $tempquery = new WP_Query();$tempquery->query_vars = $search_parameters;
relevanssi_do_query($tempquery);
$posts = $tempquery->posts;return $posts;
}June 28, 2017 at 12:45 am #813653Hi Basilis,
Thank you for your quick response.
I really understand what issue is beyond the scope of this forum, but I think in a woocommerce site, in the search results page, at least the price of the product, should be displayed by default.
Best regards,
NickJune 28, 2017 at 12:49 am #813654Thank you @Aribann for your answer. I really appreciate that!
June 29, 2017 at 10:08 am #814308Hi Nick,
This might help you
https://kriesi.at/support/topic/search-results-with-price/Best regards,
VictoriaJune 30, 2017 at 7:17 pm #815121Hi Victoria,
Thank you very much for your excellent support!
Indeed, it helps but can I style the price element thru css because it displays the price as plain text and not aligned, as you see in screenshot: https://prnt.sc/fq3h4r
Is that easy to you to display and the Regular (strikethrough) price, as screenshot? https://prnt.sc/fq3k1h
URL: http://zoomit.gr/wordpress_2/?s=lg+
I really appreciate your help,
Thank you in advance,
Best regards,
NickJuly 5, 2017 at 6:29 am #816634Hi,
Wrap the price inside a container with the price class attribute.
$sale_price = get_post_meta( get_the_ID(), '_price', true); echo "<span class='price'>".$sale_price."</span>";
Use the “.price” selector to adjust the style of the price text.
Best regards,
IsmaelJanuary 18, 2018 at 3:55 am #898861Hi Ismael,
Unfortunately, it didn’t work…
It displays only one price and not for all products….
Please help me… I would like your precious help…
Please see screenshots:
http://prntscr.com/i1z1n7
http://prntscr.com/i1z1wjThank You in advance,
Nick
January 22, 2018 at 6:22 am #900617Hi,
Thank you for the info.
You should add the code inside the loop. Look for this code around line 88.
$excerpt = trim(get_the_excerpt());
Place the price above it.
Best regards,
IsmaelJanuary 22, 2018 at 4:58 pm #900883Hi Ismael,
Your code worked! You are brilliant! Thank You very much.
Could your also include in your code the regular price also (strike-out price when there is a product offer) and the euro sign € too?
See screenshot: http://prntscr.com/i3yogb
Thank You in advance,
Nick
January 25, 2018 at 4:26 am #902493Hi,
Glad that the modification worked. Please provide a keyword that we can use so that we can search for a product on sale. We would like to inspect it.
Best regards,
IsmaelJanuary 25, 2018 at 4:54 pm #902899Hi Ismael,
Thank You for your quick response.
Keyword: lg tv
http://zoomit.gr/wordpress_2/?s=lg+tvProduct page:
I would like to achieve that: https://prnt.sc/i3yogb
Thank You in advance.
Best regards,
NickJanuary 26, 2018 at 12:40 pm #903345Hi,
Thank you for the info.
Please replace the previous modification with the following code.
global $product; echo $product->get_price_html();
Best regards,
IsmaelFebruary 1, 2018 at 4:54 pm #906378Hi Ismael,
WOW!! It worked!!
Thank you so much for your excellent support!!!
Best regards,
NickFebruary 2, 2018 at 6:10 am #906630Hi Nick,
Great, glad we could help :-)
Please let us know if you should need any further help on the topic or if we can close it.
Best regards,
RikardMarch 5, 2018 at 3:38 am #921268Hi Rikard,
All are ok. Pls close the ticket.
Thank You.
Best regards,
NickMarch 5, 2018 at 7:59 am #921330 -
AuthorPosts
- The topic ‘Search results page customization’ is closed to new replies.