WordPress.org

Forums

YOP Poll
[resolved] Shortcode not working (8 posts)

  1. paozinho
    Member
    Posted 1 year ago #

    Hello everybody...
    When I paste the shortcode [yop_poll id="1"] in the post text editor nothing happens..

    If you want take a look this is the url:
    http://clapiz-stage.espero.it/attivita/sondaggio-lorem-ipsum/

    I tried to unistall and reinstall the plugin but nothing happens..
    This is the list of other plugins on the site:

    Akismet
    Contact Form 7
    Event Geek
    Meta Slider
    WP User Avatar
    Newsletter Wysija

    I'm using wordpress twenty-twelve theme...
    Any idea to fix this problem ?

    Thank you very much
    Paoz

    http://wordpress.org/plugins/yop-poll/

  2. YOP
    Member
    Plugin Author

    Posted 1 year ago #

    Hi Paoz,

    Until we figure our what causes that problem, instead of shortcodes you can use <?php return_yop_poll( $poll_id ); ?>

    You have to add it to your wordpress theme template and $poll_id is your poll's id.

    Best wishes,

    YOP Team

  3. paozinho
    Member
    Posted 1 year ago #

    Hello, thank you very much... This would be perfect if i could pass the $poll_id dinamically, because i need to display different polls in the same page template... Is there a way to do this?

    Regards,
    Paoz

  4. YOP
    Member
    Plugin Author

    Posted 1 year ago #

    Hey Paoz,

    You could replace "$poll_id" with "-1" for Current active poll, "-2" for Latest Poll ID and "-3" for Random Poll.

    Best wishes,

    YOP Team

  5. paozinho
    Member
    Posted 1 year ago #

    Ok thank you...

  6. mrhaha80
    Member
    Posted 10 months ago #

    hi,

    I tried :
    <?php return_yop_poll(2); ?> but the poll does not appear.

    I can see the code below when i "View Source":
    <!--?php
    return_yop_poll(2);
    ?-->

    May I know what is the issue?

    Many thanks in advanced!

  7. YOP
    Member
    Plugin Author

    Posted 10 months ago #

    Hi mrhaha80,

    Instead of <?php return_yop_poll(2); ?> you should use

    <?php return_yop_poll(-2); ?>

    Please try again and let us know if you need more help.

    Best wishes,

    YOP Team

  8. mrhaha80
    Member
    Posted 10 months ago #

    Yeah!

    Many thanks!!

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.