Support » Plugin: YOP Poll » Give one poll two different templates?

  • Resolved Carrie


    I have a poll. I want it to appear in a widget in the sidebar, which requires a relatively narrow width. So I’ve adjusted the stylesheet for that poll so that it fits.

    But then I want the same poll to also be able to be displayed in the body of a page. I’ve used a shortcode to display the poll or it’s results – but I want it to display with a different, wider view when it appears that way. Is there some way to specify a different template in the shortcode?

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author YOP


    Hey Carrie

    You need to do a couple of changes for this.

    First in the css of the template you are using make sure you have the code below

    #yop-poll-container-%POLL-ID% {

    When you add the shortcode, use <div style="width:200px">[yop_poll id="POLL_ID"]</div> instead. Your editor needs to be in text mode when adding the shortcode.

    You can change the 200px to the width you need.

    Please let us know if this solves your issue.

    Best Regards,
    YOP Team


    I assume you meant 100%, not 100px, right? I did update the width to a % and it worked like a charm! I will add that the yop poll, for whatever reason, thinks that 100% is larger than the space it has by about 20px in both instances, whereas other content in the same div doesn’t. I don’t know if it’s padding, margins or what. I didn’t spend the time to troubleshoot. But rather than 100%, I used 90% and it was perfect. Thank you!


    Plugin Author YOP


    Yes, 100%.

    my bad.

    glad to hear everything works as you want.

    best regards,
    YOP Team

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Give one poll two different templates?’ is closed to new replies.