By Llama on
hi, wonder if someone could give me a hand.
I'm trying to use field_view_value to get a taxonomy value however its printing with link:
<a href="/bands/solange" typeof="skos:Concept" property="rdfs:label skos:prefLabel">Solange</a>
and I just require the "Solange" bit without any HTML, any ideas how to do this? been hunting for some time with no luck.
$bands = field_get_items('node', $node, 'field_band');
$bandsearch = field_view_value('node', $node, 'field_band', $bands[0]);
print render($bandsearch);
Comments
You could
You could use:
But if you already have access to the node, you can also use:
- Brendan
Render taxonomy_term name as plain text
My field "field_offer_city" is a taxonomy term with a list of cities.
$offer_city = field_get_items('node', $node, 'field_offer_city');$offer_city_r = field_view_value('node', $node, 'field_offer_city', $offer_city[0], array('type' => 'taxonomy_term_reference_plain'));