People Group Profile page – ArcGIS dashboard map – output via PEID var

// Get the value of the ‘lang’ field (ACF) from the current post $PEID = get_field(‘PEID’); if ($PEID) { $encoded_peid = urlencode($PEID); $dashboard_url = “https://imb.maps.arcgis.com/apps/dashboards/cd8bf39013bb42f2b7361219e533dec0#aPEID={$encoded_peid}”; //$dashboard_url = “https://imb.maps.arcgis.com/apps/dashboards/02e41687079246e6843bce695da0af8e#aPEID={$encoded_peid}”; echo ‘ ‘; echo ‘‘; echo ‘ ‘; } else { echo…Continue reading

Homepage – Total PG stats – shortcode generation based on field name

// Helper function to get a value from the summary table function get_pg_summary_value($field_name) { global $wpdb; $valid_fields = [ ‘total_pop’, ‘total_pgs’, ‘total_uupgs’, ‘total_uupg_pop’, ‘total_upgs’, ‘total_upg_pop’, ‘total_nupgs’, ‘total_nupgs_pop’, ‘extra1’, ‘extra2’, ]; // Prevent SQL injection by only allowing known fields if…Continue reading