- Created Find a Trainer page with interactive map and trainer directory - Integrated MapGeo plugin for displaying 45+ geocoded trainer locations - Built advanced filtering system (State/Province, Business Type, Training Format, Training Resources) - Implemented trainer profile cards with View Profile and See Events buttons - Added contact form handler with validation and email notifications - Created database table for tracking contact submissions - Responsive design with mobile-friendly layout - AJAX-powered search and filter functionality - Pagination support for trainer directory - Call to action for trainer registration Technical Implementation: - HVAC_Find_Trainer_Page: Main page handler with custom template - HVAC_MapGeo_Integration: Map marker management for trainer locations - HVAC_Contact_Form_Handler: Form processing with rate limiting - HVAC_Trainer_Directory_Query: Advanced querying with caching - HVAC_Contact_Submissions_Table: Database operations for submissions Tested with existing 53 trainer profiles, 45 geocoded locations Page live at: /find-a-trainer/ Co-Authored-By: Ben Reed <ben@tealmaker.com>
81 lines
No EOL
2.5 KiB
Bash
Executable file
81 lines
No EOL
2.5 KiB
Bash
Executable file
#!/bin/bash
|
|
|
|
# Investigate MapGeo plugin usage
|
|
# Usage: ./scripts/investigate-mapgeo.sh
|
|
|
|
source .env
|
|
|
|
echo "=== Investigating MapGeo Plugin ==="
|
|
|
|
ssh -o StrictHostKeyChecking=no "$UPSKILL_STAGING_SSH_USER@$UPSKILL_STAGING_IP" << 'ENDSSH'
|
|
cd /home/974670.cloudwaysapps.com/uberrxmprk/public_html
|
|
|
|
echo "=== Checking if map shortcode exists ==="
|
|
wp eval '
|
|
global $shortcode_tags;
|
|
$map_shortcodes = [];
|
|
foreach ($shortcode_tags as $tag => $callback) {
|
|
if (strpos(strtolower($tag), "map") !== false || strpos(strtolower($tag), "igm") !== false) {
|
|
$map_shortcodes[] = $tag;
|
|
}
|
|
}
|
|
echo "Map-related shortcodes found: " . implode(", ", $map_shortcodes) . "\n";
|
|
'
|
|
|
|
echo -e "\n=== Checking for existing maps in database ==="
|
|
wp db query "SELECT ID, post_title FROM wp_posts WHERE post_type = 'igmap' OR post_type = 'maps' OR post_type = 'interactive_map' LIMIT 10;" 2>/dev/null || echo "No maps found in database"
|
|
|
|
echo -e "\n=== Checking post types ==="
|
|
wp eval '
|
|
$post_types = get_post_types(["public" => true], "names");
|
|
foreach ($post_types as $post_type) {
|
|
if (strpos(strtolower($post_type), "map") !== false || strpos(strtolower($post_type), "igm") !== false) {
|
|
echo "Map-related post type: " . $post_type . "\n";
|
|
}
|
|
}
|
|
'
|
|
|
|
echo -e "\n=== Checking map with ID 5872 ==="
|
|
wp eval '
|
|
$post = get_post(5872);
|
|
if ($post) {
|
|
echo "Post ID 5872 exists:\n";
|
|
echo " Type: " . $post->post_type . "\n";
|
|
echo " Title: " . $post->post_title . "\n";
|
|
echo " Status: " . $post->post_status . "\n";
|
|
} else {
|
|
echo "Post ID 5872 does not exist\n";
|
|
}
|
|
'
|
|
|
|
echo -e "\n=== Testing display-map shortcode ==="
|
|
wp eval '
|
|
if (shortcode_exists("display-map")) {
|
|
echo "display-map shortcode is registered\n";
|
|
$output = do_shortcode("[display-map id=\"5872\"]");
|
|
echo "Shortcode output length: " . strlen($output) . " characters\n";
|
|
if (strlen($output) > 0 && strlen($output) < 500) {
|
|
echo "Output: " . $output . "\n";
|
|
}
|
|
} else {
|
|
echo "display-map shortcode is NOT registered\n";
|
|
}
|
|
'
|
|
|
|
echo -e "\n=== Looking for alternative map shortcodes ==="
|
|
wp eval '
|
|
// Common map shortcode patterns
|
|
$test_shortcodes = ["igm", "interactive-map", "interactive_map", "igmap", "maps"];
|
|
foreach ($test_shortcodes as $shortcode) {
|
|
if (shortcode_exists($shortcode)) {
|
|
echo "Found shortcode: [$shortcode]\n";
|
|
}
|
|
}
|
|
'
|
|
|
|
echo -e "\n=== Checking MapGeo plugin files ==="
|
|
ls -la wp-content/plugins/interactive-geo-maps-premium/src/ 2>/dev/null | head -n 10 || echo "Plugin directory not accessible"
|
|
|
|
ENDSSH
|
|
|
|
echo "=== Investigation Complete ===" |