Displaying Election Results

Once you have created your date and races, follow the steps below to add the election data to your site.

On A Page
You can add an entire election or a single race to a page using the Election Results object in the Page Builder.  To add the results:

  1. Edit the page you want to display results on.
  2. Add a new element to the page and select the Election Results object.
  3. From the Elections dropdown, select either the race or date you would like to show results for.
  4. If you are using States, select the appropriate State from the dropdwon. This will filter the races from the selected Date.
  5. Check the “Yes” box for Enable Search to add a search box to the results page.
  6. Check the “Yes” box for Collapsed to have your all your races collapse to just the race title with a click to expand button. This can be used when showing many races on a single page. The collapse can also be overridden per race by enabling the Featured Race option on the individual races.
  7. Save the object.
  8. Update or Publish the page.

Election results will appear on the page once the page is published with the elections element. Results for the selected election or race will stay on this page unless removed. Any updates to the results should be made in Elections > Edit Results.

In An Article
You can add the entire election or individual race results to an article body using shortcodes. To get the shortcodes, find a race from the election and edit:

  1. Elections > All Races
  2. Find one of the races from the election you want, hover over the race and select Edit Race.
  3. Under the Race Details there are two sections called Race Shortcode and Election Shortcode. Race Shortcode will display just the results of this specific race (e.g. County Commissioner) and the Election Shortcode will display all races that fall under the selected Date of this race.
  4. Copy the shortcode you want.
  5. Find the article you want the results to display in and edit it.
  6. Paste the shortcode into the article body where ever you want the results to display.
  7. Save your changes.

Frequently Asked Questions

How can I control the order of the races in the results?

Your races will default to newest first in the order that they were entered into Rayos, however there is a numbered Priority setting that can be set for each race so you can set the order. Some of the election feeds (such as BTI) pass through an election priority. Any changes to the ordering needs to be done on the feed before it is passed to Rayos.

To set the race Priority, go to Elections > All Races. Filter by the election Date if you need to then find the race you want to appear at the top of your results page, hover over the title to get the options and choose Quick Edit. On the right there is a field for Priority. Set this to a high number (the results will sort by this priority number, highest to lowest), “999” is a good place to start. Once set, click to Update. Then go on and set the Priority for the rest of your races with progressively smaller numbers. Note that any race without a set Priority will just default to “0” and will display by the publish date.