Why is the dividend yield (Dividend divided by market price) of a stock a valuable parameter to consider when evaluating a stock? By looking at it, what can one infer about the stock?

edit: Thanks for the answers. But I wish to know why the parameter is dividend/market price rather than just 'dividend'? What 'extra' info you can uncover by looking at dividend/market price that you cannot get from 'dividend'?


Question: modify strip_tags function to use term slug instead of term name
Answer: While I can't guarentee that this is what you are looking for (as you have not posted what your expected output should be), hopefully this will help.

Even if it's not exactly what you are looking for, you have the whole object for each term available to you so that you can manipulate the output exactly as you wish.

/** Grab the terms within the for the 'portfolio_cat' taxonomy for the current post */
$terms = wp_get_object_terms($post-&gt;ID, 'portfolio_cat'); // If you are in The Loop you can replace '$post-&gt;ID' with 'get_the_ID()'

/** Loop through each term and add them to an array */
$formatted_terms = array();
foreach($terms as $term) :

    $formatted_terms[] = sprintf(
        '&lt;a href="urlhere/%1$s" title="View posts in $2%s"&gt;%3$s&lt;/a&gt;',
        $term-&gt;slug,            /** %1$s - The term slug (for the 'href' attribute)*/
        esc_attr($term-&gt;name),  /** %2$s - The term name (formatted for the 'title' attribute) */
        $term-&gt;name             /** %1$s - The term name (for display) */
    );

endforeach;

/** Output the terms, formatted as you desire */
echo join(',', $formatted_terms);


The function that is used to achieve your desired output is wp_get_object_terms().  If you require, you can pass a 3rd parameter as an array containing arguments to order the terms and to only retrun certain fields, so please take a look at the Function Reference.

With the code above the $temrs are returned as an array of objects, and should you wish to use any more of the fields returned for each term here is how the object is formatted -

[0] =&gt; stdClass Object
    (
        [term_id] =&gt; 22
        [name] =&gt; My Taxonomy Term
        [slug] =&gt; my-taxonomy-term
        [term_group] =&gt; 0
        [term_taxonomy_id] =&gt; 29
        [taxonomy] =&gt; portfolio_cat
        [description] =&gt; 
        [parent] =&gt; 20
        [count] =&gt; 5
        [filter] =&gt; raw
    )