Working in WordPress PHP I am trying to pass a value into class tag of an element
<div class="element-item"></div>
to be like
<div class="element-item comedy"></div>
$term = get_the_term_list( get_the_ID(), 'type' );
echo '<div class="element-item '.$term.'">';
the value is pupping out of the class tag and display on the page!
I checked the source code and it seems that I am passing entire a link to the class tag! Canadian
can you please let me know why this is happening and how I can fix it?