Helper Tool
The /helper page is a shortcode generator for creating and managing map embeds in WordPress.
Tabs
1. Crear mapa nou (New map)
Create a new map embed from scratch:
- Paste a GPX URL into the input field
- Select the embed height (300px, 400px, 480px)
- Click “Previsualitzar mapa” to see a live preview
- Copy the generated WordPress shortcode or HTML iframe code
The shortcode output looks like:
[map gpx="https://...ruta.gpx" style="height:400px"]The iframe output looks like:
<iframe src="/embed?gpx=...&chart=auto" width="100%" height="600px" ...></iframe>Note: the iframe height includes +200px for the elevation chart and bottom bar.
2. Reconvertir shortcode antic (Legacy reconvert)
Convert old broken [map ...] shortcodes to the new format:
- Paste the old shortcode into the textarea
- Click parse — extracts the
gpx=URL and anyheight:from the style - Preview the new embed
- Copy the updated shortcode
3. Batch (CSV)
Bulk shortcode generation from a CSV scan of the WordPress site:
- Automatically loads
/track-intern-scan-updated.csvfrom the public folder - Lists all pages and their tracks
- For each track: select preview height, view the embed, copy the shortcode
- Shortcode heights are reduced by 200px from the preview height (the plugin adds 200px back)
Chart policy selector
A dropdown at the top of the page controls the elevation chart behavior for all generated shortcodes:
- Auto (default): chart collapses on mobile, expands on desktop
- Show: chart always visible
- Hide: chart always hidden
Copy buttons
Each output section has a copy button that uses the clipboard API. PostHog events are fired for each copy action (shortcode_copied).