WordPress.org

Ready to get started?Download WordPress

Forums

YOP Poll
[resolved] Shortcode for results? (6 posts)

  1. yoyoma1974
    Member
    Posted 9 months ago #

    Cool plugin. I know I can show results after a poll is submitted, but is there a shortcode to just show a poll's results? I'd like to just show results on a certain page.

    Thanks,

    Tim

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

  2. YOP
    Member
    Plugin Author

    Posted 9 months ago #

    Hi Tim,

    We are sorry but at the moment that's not possible.

    Regards,

    YOP Team

  3. yoyoma1974
    Member
    Posted 9 months ago #

    What if I just enter the code from the Template After Vote? So if I were to add this code to the page:

    <div id="yop-poll-name-%POLL-ID%" class="yop-poll-name">%POLL-NAME%</div>
    <div id="yop-poll-question-%POLL-ID%" class="yop-poll-question">%POLL-QUESTION%</div>
    <div id="yop-poll-answers-%POLL-ID%" class="yop-poll-answers">
    	<ul>
    		[ANSWER_RESULT_CONTAINER]
    		<li class="yop-poll-li-result-%POLL-ID%">
    			<label class="pds-feedback-label-%POLL-ID%">
    				<span class="pds-answer-text-%POLL-ID%">%POLL-ANSWER-LABEL%</span>
    				<span class="pds-feedback-result-%POLL-ID%">
    					<span class="pds-feedback-per-%POLL-ID%"> %POLL-ANSWER-RESULT-LABEL%</span>
    				</span>
    			</label>
    			<div>
    			 %POLL-ANSWER-RESULT-BAR%
    		   </div>
    		</li>
    		[/ANSWER_RESULT_CONTAINER]
    	</ul>
    </div>
    <div id="yop-poll-vote-%POLL-ID%" class="yop-poll-footer">
    	<div>%POLL-TOTAL-ANSWERS%</div>
    	<div>%POLL-TOTAL-VOTES%</div>
    	<div id="yop-poll-back-%POLL-ID%">%POLL-BACK-TO-VOTE-LINK%</div>
    </div>
  4. YOP
    Member
    Plugin Author

    Posted 9 months ago #

    Hi yoyoma1974,

    You can add the code in the Template Before Vote section and set View Results to Before Vote.

    Best wishes,

    YOP Team

  5. yoyoma1974
    Member
    Posted 9 months ago #

    hmmm, any plans to add a shortcode to easily show results independently for each specific poll? Would really make this a complete poll solution I think.

    Tim

  6. YOP
    Member
    Plugin Author

    Posted 9 months ago #

    Hey Tim,

    Thanks for the suggestion.

    We will take it into consideration and implement it on a future version.

    Regards,

    YOP Team

Reply

You must log in to post.

About this Plugin

About this Topic

Tags