Plugin Author
YOP
(@yourownprogrammer)
Hi George,
Edit the template you used for your poll and in the CSS section add
button, html input[type="button"], input[type="reset"], input[type="submit"] { float:left; background-color: the-color-you-want !important;}
Regards,
YOP Team
Hello Yop Team,
I have applied the code but all of my buttons inside the page were affected.
I want to apply a class to the button were should I place it in the code?
Best regards.
Plugin Author
YOP
(@yourownprogrammer)
Hi dookla,
You can add in the CSS section of the template the code below:
#yop-poll-vote-%POLL-ID% div button{
background:"the-color-you-want";
color:"the-color-you-want";
}
Best wishes,
YOP Team
Thank you for your reply,
I use wordpress built in button class called “button-primary”
in all of my buttons.
I wonder if I can add the same code in this plugin to avoid changing the style specific each time.
example:
<p class=”submit”>
<input id=”submit” class=”button button-primary” type=”submit” value=”Click Here” name=”submit”>
</p>
I hope it is possible
Best regards,
Plugin Author
YOP
(@yourownprogrammer)
Hi,
Edit yop_poll_model.php and in return_poll_html function replace
$template = str_ireplace( '%POLL-VOTE-BUTTON%', '<button class="yop_poll_vote_button" id="yop_poll_vote-button-' . $poll_id . $unique_id . '" onclick="yop_poll_register_vote(\'' . $poll_id . '\', \'' . $location . '\', \'' . $unique_id . '\'); return false;">' . $poll_options['vote_button_label'] . '</button>', $template );
with
$template = str_ireplace( '%POLL-VOTE-BUTTON%', '<button class="yop_poll_vote_button button-primary" id="yop_poll_vote-button-' . $poll_id . $unique_id . '" onclick="yop_poll_register_vote(\'' . $poll_id . '\', \'' . $location . '\', \'' . $unique_id . '\'); return false;">' . $poll_options['vote_button_label'] . '</button>', $template );
Regards,
YOP Team
Thanks,
I’ve edited but the button’s style, but still has the default grey style.
There are two occurrences of this row and I edited both of them and nothing was happened too.
Regards,
Plugin Author
YOP
(@yourownprogrammer)
Hi,
Please send us a link to your poll so we may take a look.
Best wishes,
YOP Team