WordPress.org

Ready to get started?Download WordPress

Forums

[Plugin: WP-Polls] How to make poll into fancybox (2 posts)

  1. wicked_kiD
    Member
    Posted 11 months ago #

    Hello, i'm trying to make my polls into fancybox. I made poll.php with this code:

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

    and made link with class="fancybox-iframe" to this file.
    This link placed at main page, but in fancybox no result. After it i placed code like this:

    <h2>Polls</h2>
    <ul>
    <li><?php get_poll(2);?></li>
    </ul>
    and get error "Call to undefined function get_poll()".
    Why function become undefined? When i place this code into main page it's work.

    P.S. sorry for my english, hope u'll understand what i mean.

  2. Lester Chan
    Member
    Posted 11 months ago #

    you can't put it in an iframe.

    <?php if (function_exists('vote_poll') && !in_pollarchive()): ?>
        <div class="fancybox">
            <h2>Polls</h2>
            <ul>
                <li><?php get_poll(2);?></li>
            </ul>
            <?php display_polls_archive_link(); ?>
        </div>
    <?php endif; ?>

Reply

You must log in to post.

About this Topic