Home › Forums › WoodMart support forum › Can I show regular price after sale price?
Can I show regular price after sale price?
- This topic has 5 replies, 2 voices, and was last updated 2 weeks, 4 days ago by
Aizaz Imtiaz Awan.
-
AuthorPosts
-
April 19, 2025 at 4:19 pm #655397
smart.sharukhkhan786ParticipantHi,
Right now by default it’s showing regular price and then sale price, and I want to show sale price first and after that regular price. How can I do that?
Attachments:
You must be logged in to view attached files.April 21, 2025 at 8:41 am #655513
Aizaz Imtiaz AwanKeymasterHello,
I’ve checked your site, and currently the sale price is already showing first, followed by the regular price — which is exactly the order you’re aiming for.
See Screenshot for clarification:https://ibb.co/LD9M4Fbr
If you have any questions, feel free to contact us.
Best Regards,
April 23, 2025 at 2:56 pm #656095
smart.sharukhkhan786ParticipantHi,
As shown in the screenshot: https://ibb.co/LD9M4Fbr
Currently, the regular price is shown first, followed by the sale price. I believe there should be an option to switch this — to show the sale price first, then the regular price.
Most big companies display prices this way, and it looks more attractive to customers.
Could you please let me know how I can set it up to display sale price ➡️ regular price?
Thanks in advance!
April 23, 2025 at 3:27 pm #656104
Aizaz Imtiaz AwanKeymasterHello,
By default, WooCommerce displays the regular price first, followed by the sale price. This is the standard behavior of WooCommerce.
However, if you’d like to switch the order and show the sale price first, Sorry, but there is no option in Theme Settings available for that.
Try to add the following code in the functions.php of the child theme to achieve this.
//Swap "Regular price" and "Sale price" function swap_sale_regular_price($price, $regular_price, $sale_price) { $price = '<ins>' . (is_numeric($sale_price) ? wc_price($sale_price) : $sale_price) . '</ins><del aria-hidden="true">' . (is_numeric($regular_price) ? wc_price($regular_price) : $regular_price) . '</del>'; return $price; } add_filter('woocommerce_format_sale_price', 'swap_sale_regular_price', 10, 3);
Best Regards,
April 23, 2025 at 3:29 pm #656105
smart.sharukhkhan786ParticipantHi,
Thank you for the quick reply.
I just wanted to ask — will this have a negative impact on SEO? I wouldn’t want to compromise SEO or create a structure that goes against Google or search engine guidelines just for the sake of design. 🙂
April 24, 2025 at 7:25 am #656214
Aizaz Imtiaz AwanKeymasterHello,
No worries — this customization won’t negatively affect SEO. The code only changes the visual order in which the prices are displayed on the front end. It doesn’t alter the actual product schema or structured data that search engines like Google use for indexing.
Best Regards,
-
AuthorPosts
- You must be logged in to create new topics. Login / Register