WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am using the Vote Me Up plugin http://wordpress.org/extend/plugins/vote-it-up/ on my site. I have the MostVotedAllTime function showing the top 10 posts. Currently this displays the Post Title only. I am wondering if it is possible to display a custom taxonomy associated with the post here.

for example it is a chart showing music albums where the post title is the album title. I have a taxonomy called artist which i would also like to display in the chart.

Does anybody know if this is possible or if there are any better plugins for this?

Here is the code for the MostVotedAlltime() function

function MostVotedAllTime_Widget() {
$a = SortVotes();

<div class="votewidget">
<div class="title">Most Voted</div>
$rows = 0;

//Now does not include deleted posts
$i = 0;
while ($rows < get_option('voteiu_widgetcount')) {
if ($a[0][$i][0] != '') {
        $postdat = get_post($a[0][$i][0]);
    if (!empty($postdat)) {

        if (round($rows / 2) == ($rows / 2)) {
            echo '<div class="fore">';
        } else {
            echo '<div class="back">';
        echo '<div class="votecount">'.$a[1][$i][0].' '.Pluralize($a[1][$i][0], 'votes', 'vote').' </div><div><a href="'.$postdat->guid.'" title="'.$postdat->post_title.'">'.$postdat->post_title.'</a></div>';
        echo '</div>';
if ($i < count($a[0])) {
} else {
break; //exit the loop
share|improve this question

closed as off-topic by Pieter Goosen, kaiser Nov 22 '14 at 9:03

This question appears to be off-topic. The users who voted to close gave this specific reason:

If this question can be reworded to fit the rules in the help center, please edit the question.

Add the code for the MostVotedAllTime() function. – toscho May 12 '12 at 5:36
Hi, edited post to include code for the MostVotedAllTime() function – coolGeek May 12 '12 at 11:08
up vote 0 down vote accepted

Use get_the_term_list() to print the assigned terms.


    echo '<div class="votecount">' . /* stripped */ . '</div>';
    echo echo get_the_term_list( $postdat->ID, 'taxonomyname', 'Taxonomy Label: ', ', ', '' );
    echo '</div>';

Replace 'taxonomyname' and 'Taxonomy Label: ' with the values you actually need.

share|improve this answer
thanks.Just tried this however it displays the same taxonomy value for each post and not the one that is associated with the post – coolGeek May 12 '12 at 12:08
Changing to get_the_term_list( $postdat->ID, 'artist', ' ', ', ', '' ); seems to have worked :) – coolGeek May 12 '12 at 12:14

Not the answer you're looking for? Browse other questions tagged or ask your own question.