Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Support Milos

    (@miloss84)

    Hi there,

    Good morning, Milos!

    WordPress by default doesn’t allow some file types like GPX for security reasons. To enable the upload of GPX files, you can use one of these methods:

    Method 1: Add Support for GPX Files Using Code

    You can add support for GPX files by adding code to your theme’s functions.php file or using a custom plugin:

    1. Access functions.php:
      • Go to your WordPress dashboard.
      • Navigate to “Appearance” > “Theme Editor.”
      • Open the functions.php file of your active theme.
    2. Add the Following Code:function custom_upload_mimes($existing_mimes) { $existing_mimes['gpx'] = 'application/gpx+xml'; return $existing_mimes; } add_filter('mime_types', 'custom_upload_mimes');
    3. Save the Changes.

    This code snippet will allow GPX files to be uploaded to the media library.Method 2: Use a Plugin

    If you prefer not to edit code, you can use a plugin to manage file uploads:

    1. Install the Plugin:
      • Go to “Plugins” > “Add New.”
      • Search for “WP Add Mime Types” or a similar plugin.
      • Install and activate the plugin.
    2. Configure the Plugin:
      • Go to “Settings” > “MIME Types” or the plugin’s settings page.
      • Add the following MIME type:
        • MIME Type: application/gpx+xml
        • File Extension: gpx
    3. Save the Settings.

    After following either method, you should be able to upload GPX files to the media library and use them with Elementor.

    Kind regards,

    Thread Starter katrienvb

    (@katrienvb)

    Thanks,

    I tried it with a plugin and i know how to add it but the file opens in a new window as a text but i don’t want that it opens in a new window but i want that it start to download.

    I would a button like on this website https://www.icoonfietsroutes.be/kustroute

    Kind regards,

    Plugin Support Joel

    (@joelsm)

    Hi there,

    Open the .htaccess file for editing. If you don’t see it, make sure your file manager is set to show hidden files. Add the Following Code:

    <FilesMatch "\.gpx$">
    ForceType application/octet-stream
    Header set Content-Disposition attachment
    </FilesMatch>

    Clear your browser cache and test with different browsers to confirm consistent behavior.

    If you have any questions or need further help, feel free to ask!

Viewing 3 replies - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.