WordPress.org

Ready to get started?Download WordPress

Forums

And The Winner Is...
How can I display the winner publicly (2 posts)

  1. DesignByAnita
    Member
    Posted 1 year ago #

    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/

  2. Angelica Costa
    Member
    Posted 10 months ago #

    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/

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.