diff --git a/lga-page.php b/lga-page.php
new file mode 100644
index 0000000..786a3ee
--- /dev/null
+++ b/lga-page.php
@@ -0,0 +1,50 @@
+
' . "\n");
+
+foreach ($lga_files as $config_file) {
+ $config_string = file_get_contents($config_file);
+
+ if ($config_string !== FALSE) {
+ $config = json_decode($config_string, true);
+ } else {
+ error_log("Error opening config.json.");
+ exit(1);
+ }
+
+ if (array_search($config['slug'], $lgas_with_data) === false)
+ $font_weight = 300;
+ else
+ $font_weight = 700;
+
+ print('' . "\n");
+ print('- ');
+ print('' . $config['councilName'] . "
\n");
+ print('' . "\n");
+}
+
+print('
');
+
+exit(0);
diff --git a/make-lga-page.sh b/make-lga-page.sh
new file mode 100755
index 0000000..d68130a
--- /dev/null
+++ b/make-lga-page.sh
@@ -0,0 +1,25 @@
+#!/bin/bash
+
+# This script uses the jq, wp, and php commands, make sure they are installed before running this script.
+
+# The folder containing data for each council.
+# Includes the list of candidates and any media.
+DATA_PATH="../spl-data"
+
+# Iterate over folders in data path
+candidates_files=()
+for folder in "$DATA_PATH"/*; do
+ if test -f "$folder"/candidates-generic.csv; then
+ candidates_files+=("$folder"/candidates-generic.csv)
+ elif test -f "$folder"/candidates.csv; then
+ candidates_files+=("$folder"/candidates.csv)
+ fi
+ if test -f "$folder"/config.json; then
+ lga_files+=("$folder"/config.json)
+ fi
+done
+
+content=$(php lga-page.php --candidates-files "${candidates_files[*]}" \
+ --lga-files "${lga_files[*]}")
+
+echo "$content" | wp post update 465 -