I'd like to add a custom attribute text to each product on the catalog page (a tagline), and as I understand it, I need to use the following php below:
<?php echo $_product->get_attribute( 'tagline' );?>
(tagline being the name of the attribute I've set)
However, this produces an error, presumably because not all products have this attribute set.
So I'm guessing that I need to add some additional code to check whether the given attribute is available, before the php above.
Any pointers on how to to do this?