The $ symbol in the listing, still shows after sold out item

hello everyone, in my website, swkan.com, after selecting an item as sold out, the price is hiding but the “$” still shows.

pleas help me to solve this problem, Thanks

Hi,

Please clarify, do you have this symbol added as a custom listing attribute? If yes, then this is how it should work by default, as there is no function that automatically hides the attribute when the listing is sold. As an alternative, please see this similar topic: How can you mark a listing as sold? - #16

​I hope this is helpful to you

Thanks for the response, the code snippet remove the price attribute and $ symbol in the slidebar but left the $ symbol in the main page:

in another word, in the main page just remove the price attribute and left the $ symbol, I want to remove or hide both price attribute and the $ symbol in the main page as removed from slidebar.
Thanks

Hi,

I see. To do this, you need to use CSS tweaks. If customizations are required for your site, please try customizing it using the collection of code snippets Search · user:hivepress · GitHub and other developer resources, or consider hiring someone for custom work Customize your website | HivePress

Hello,

This jQuery snippet should solve your problem :

jQuery(document).ready(function ($) {
	$( ".hp-listing__attribute--price" ).each(function( index ) {
	  if($( this ).text() =='$'){ 
		  $( this ).hide();
	  }
	});
});
1 Like