WordPress.org

Ready to get started?Download WordPress

Forums

YOP Poll
[resolved] Give one poll two different templates? (4 posts)

  1. Carrie
    Member
    Posted 11 months ago #

    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?

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

  2. YOP
    Member
    Plugin Author

    Posted 11 months ago #

    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% {
        width:100px;

    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

  3. Carrie
    Member
    Posted 11 months ago #

    Hi,

    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!

    Carrie

  4. YOP
    Member
    Plugin Author

    Posted 11 months ago #

    Yes, 100%.

    my bad.

    glad to hear everything works as you want.

    best regards,
    YOP Team

Reply

You must log in to post.

About this Plugin

About this Topic

Tags

No tags yet.