WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Inserting a widgit on sidebart with code (3 posts)

  1. tristanofvp
    Member
    Posted 6 years ago #

    Hi I recently downloaded wp-polls and I want to know how to insert it with html code on my side bar. Everything on my right side bar is done with html and I can't put widgets on there without ruining it.

    Basically I want to know how to insert wp-polls by code, I've done this with wordspew, but it came with a picture showing you what code to type in.

    My site is http://www.vandalizedmusic.com if you need to look at it.

    Thanks,
    Tristan

  2. Aimee
    Member
    Posted 6 years ago #

    You add this into a template file:

    <?php if (function_exists('vote_poll') && !in_pollarchive()): ?>
    <li>
       <h2>Polls</h2>
       <ul>
          <li><?php get_poll();?></li>
       </ul>
       <?php display_polls_archive_link(); ?>
    </li>
    <?php endif; ?>

    It's always helpful to use the Documentation the plugin authors provide. I found that code through the WP-Plugins doc: http://lesterchan.net/wordpress/readme/wp-polls.html

  3. tristanofvp
    Member
    Posted 6 years ago #

    Thanks appreciate it!

Topic Closed

This topic has been closed to new replies.

About this Topic