WP Strava

Description

This plugin uses the Strava V3 API to embed maps and activity for
athletes and clubs on your WordPress site. Included are several
widgets and shortcodes for showing maps and activity summaries.

Shortcodes

[activity id=NUMBER] – add to any page or post. Also takes the following
optional parameters:

  • som – english/metric (system of measure – override from default setting)
  • map_width – width (width of image in pixels)
  • map_height – height (height of image in pixels)

Widgets

Strava Latest Rides – shows a list of the last few activities

Strava Latest Map – shows map of latest activity with option to limit
latest map to activities of a certain minimum distance

Reviews

The best there is, but room for improvement

Strava’s own facility to embed activities is rubbish, due to the fact that it’s not responsive.

This plugin is partially responsive and can be made fully responsive with a bit of tweaking.

Firstly, a little CSS:

.wp-strava-ride-container img {
  max-width: none;
  width: 100% !important;
}

Then ftp to wp-content/plugins/wp-strava/lib/RideShortcode.class.php

Download the file and then edit it. Inside you’ll see the markup for the information table.

Copy it and paste it twice, you will then have three identical tables. Then remove the bottom three rows from the second table and the top three rows from the third table.

You will now have a normal six column table and two three column tables.

Wrap the first table in a div and invent a class (e.g. <div class=”mobhide”>)

Wrap the second two tables in another div (e.g. <div class=”mobshow”>)

Then add some CSS to your stylesheet like this (change according to the widths of your site)

@media (max-width: 800px) {
	.mobhide{
	display:none;
}
}
@media (min-width: 800px) {
	.mobshow{
	display:none
}
}

The map will now always be full width and when the page gets too narrow, the columns will split into two rows, so the content wont overflow, as it currently does.

The plugin generates an image for the map, which is great because you can’t style the map or interact with it. Adding those features would significantly improve the plugin, but credit has to be given to the devs for making the only Strava plugin that has the potential to work responsively.

Read all 5 reviews

Contributors & Developers

“WP Strava” is open source software. The following people have contributed to this plugin.

Contributors

Translate “WP Strava” into your language.

Interested in development?

Browse the code or subscribe to the development log by RSS.

Changelog

1.1.1

Changes to better support translations through https://translate.wordpress.org
Cleaned up formatting

1.1

Added [activity] shortcode to deprecate [ride] in the future
Fixed static method call error in shortcode
Added title to Strava Latest Map Widget
Added Lance Willett to contributors
Added target=”_blank” to widget hrefs
Added Google Maps Key to settings (required for map images)
Added cache clear option to remove transient & image data
Cleaned up formatting

1.0

Change to Strava API V3
Switch ride shortcode to use static map

0.70

Use WordPress HTTP API for all remote calls
Use WordPress Settings API for settings page

0.62

Refactor some code.
Fixed several bugs.
Added feature to show athlete name/link to the widget if the search option is by club.

0.61

Added option to select unit of measurements on the widget.

0.6

Initial version.