You are here:  » Style price independent from description?


Style price independent from description?

Submitted by jbdob on Wed, 2012-11-07 15:35 in

Hello David,

I am trying to style the price independent from the description in the search results.
When i do this it affects both the description and the price since they are all in the same td-tag. Is the only way to apply the style independent by applying a class to the relevant td-tag, so where in the php-code should i do this?

Or is there another way to do this?

Thanks!

Submitted by support on Wed, 2012-11-07 16:05

Hi,

Sure - the trick is to enclose the price within a <span> with a unique class, and then you can style that class independently in resources/pto.css (from wp-content/plugins/pto/)

The actual span you would need to add within the Product / Main template in wp-admin > Settings > PriceTapestry.org, within which you will find:

%PRICE%

...REPLACE with:

<span class='pto_price'>%PRICE%</span>

And then in your resources/pto.css add the style as required, e.g.

.pto_price {
  color: blue;
}

Don't forget to do a hard refresh (CTRL+F5 in most browsers) after editing CSS to ensure that it is reloaded by the browser.

Cheers,
David.
--
PriceTapestry.com

Submitted by jbdob on Thu, 2012-11-08 08:30

David,

Works, thanks for hinting/pointing it out! :)