Support » Plugin: And The Winner Is... » [Plugin: And The Winner Is…] How can I display the winner publicly

  • I’ve tested the plugin and it’s working on the admin side, yay, thank you! 🙂

    Is there a way that the winner can be automatically notified or better still that the winner announced automatically via a widget within the blog post for the purpose of contest transparency?

    I’m part of a fairly tight hobby community and would like to be able to reassure customers and followers that there’s no shenanigans. 🙂

    http://wordpress.org/extend/plugins/and-the-winner-is/

Viewing 1 replies (of 1 total)
  • Angelica Costa

    (@angelcosta)

    Hi, DesignByAnita, here is what I did:

    <?
    $idcoment = get_post_meta(get_the_id(), '_and_the_winner_is', true);
    if($idcoment) {
    echo 'This giveaway/contest is finished and the winner was: <a href="#comment-'.$idcoment.'">'.get_comment_author($idcoment).'</a>';
    }
    ?>

    I pasted the code above right before <?php the_content(); ?> tag in my single.php page.

    Hope it helps.
    Here is a workign example from my blog: http://cupcakes.blog.br/geral/sorteio-de-um-dominio-e-hospedagem-por-um-ano/

Viewing 1 replies (of 1 total)
  • The topic ‘[Plugin: And The Winner Is…] How can I display the winner publicly’ is closed to new replies.