问题
I want to fetch taxonomy item(s) in my meta description tag but it add some hyperlink code in it.
I am using this code for that
<?php echo get_the_term_list( $post->ID, 'writer', '', ', ' ); ?>
as
<meta name="description" content="These are the famous writers <?php echo get_the_term_list( $post->ID, 'writer', '', ', ' ); ?>. "/>
and the result that I want it this.
<meta name="description" content="These are the famous writers one, two, three" />
but I am getting this instead.
<meta name="description" content="These are the famous writers <a href="http://www.example.com/one">one</a>, <a href="http://www.example.com/two">two</a>, <a href="http://www.example.com/three">three</a>" />
So what can I do to get them without the hyperlink.
来源:https://stackoverflow.com/questions/25641584/fetching-taxonomy-as-text