Skip to main content

Join the community of community managers!

Content Management
Content Management

All about Creating Content and Content Types

Shivam Sharma
Full Stack Web Developer at IndiaMART

I made a script for the same after spending 2 hours for the same. Add this script in the box present at the below path.

Admin Settings -> Theme -> Advanced Settings -> Code added to the end of <body> tag

<!-- Start of Poll Sorting Script -->
<script type="text/javascript">
function sortPoll(){
  var poll_wrapper = document.querySelectorAll(".question-poll-wrapper");
      var item_arr = ele.querySelectorAll(".question-poll-item");
        if(a.querySelector(".percent-value") && b.querySelector(".percent-value")){
          var cnt_a = parseInt(a.querySelector(".percent-value").innerText);
          var cnt_b = parseInt(b.querySelector(".percent-value").innerText);
          return cnt_b-cnt_a;
          return 0;
var sortPollInterval = setInterval(sortPoll,500);
<!-- End of Poll Sorting Script -->

I request Tribe team to get this added default to all community or provide a feature for the same. It'll be very helpful. Please share if there's any flaw in the script, though working fine in my community.