惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

WordPress大学
WordPress大学
The GitHub Blog
The GitHub Blog
F
Fortinet All Blogs
Cloudbric
Cloudbric
P
Palo Alto Networks Blog
T
Threatpost
T
Tor Project blog
T
Tenable Blog
AWS News Blog
AWS News Blog
Project Zero
Project Zero
L
LangChain Blog
Cyberwarzone
Cyberwarzone
Engineering at Meta
Engineering at Meta
雷峰网
雷峰网
C
CERT Recently Published Vulnerability Notes
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
Security Latest
Security Latest
云风的 BLOG
云风的 BLOG
I
Intezer
cs.CL updates on arXiv.org
cs.CL updates on arXiv.org
P
Proofpoint News Feed
A
Arctic Wolf
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
Google DeepMind News
Google DeepMind News
V
Vulnerabilities – Threatpost
C
Cybersecurity and Infrastructure Security Agency CISA
MongoDB | Blog
MongoDB | Blog
aimingoo的专栏
aimingoo的专栏
K
Kaspersky official blog
Jina AI
Jina AI
N
News | PayPal Newsroom
T
The Blog of Author Tim Ferriss
D
DataBreaches.Net
A
About on SuperTechFans
博客园 - 三生石上(FineUI控件)
博客园 - 【当耐特】
Hugging Face - Blog
Hugging Face - Blog
Recorded Future
Recorded Future
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
S
Secure Thoughts
TaoSecurity Blog
TaoSecurity Blog
P
Privacy & Cybersecurity Law Blog
P
Proofpoint News Feed
MyScale Blog
MyScale Blog
IT之家
IT之家
Forbes - Security
Forbes - Security
The Hacker News
The Hacker News
Last Week in AI
Last Week in AI
T
Threat Research - Cisco Blogs
Y
Y Combinator Blog

Another Dayu - Wordpress

我的 CSS 设置 WordPress 插件 – 旅行地图 WP Travel Map WordPress 友情链接插件 Simple 版 VXNA 和 Folo 一点点展开我的 macOS PIVOT Vol.14 折纸战士 WordPress Newsletter 插件 Bearblog 风格点赞按钮 WordPress 插件-NeoDB Integration 书影音展示页面
减肥前的准备工作 – Strava Running Sync WordPress 插件
2025-08-28 · via Another Dayu - Wordpress

Another Dayu

最近想开始减肥,作为一个博客作者,准备工作当然是做一个 WordPress 跑步骑行插件(捂脸)。

Strava Running Sync 的灵感来源于 Running Page,可自动同步 Strava 跑步数据并在网站上进行可视化展示。

展示页面:https://anotherdayu.com/runningpage/

功能特性

  • 🏃‍♀️ 多运动支持 – 自动同步跑步、步行、骑行等运动数据
  • 📊 统计展示 – 显示总距离、总时长、平均配速等统计信息
  • 🗺️ 地图可视化 – 在交互式地图上展示运动轨迹
  • 📋 数据表格 – 以表格形式展示详细的活动列表,适配电脑和手机端
  • 🎯 类型筛选 – 支持按运动类型筛选数据
  • 🔄 定时同步 – 支持每小时自动同步最新数据

安装与配置

1. 创建Strava应用

  1. 访问 Strava API设置页面
  2. 点击「Create App」创建新应用
  3. 填写应用信息:
  • Application Name: 你的应用名称
  • Category: 选择适当的分类
  • Club: 可留空
  • Website: 你的网站地址(如 https://anotherdayu.com/)
  • Authorization Callback Domain: 你的域名(如:example.com),重要:Authorization Callback Domain 只填写域名,不要包含协议和路径。(如 anotherdayu.com)

回调URL配置说明:如果你的 WordPress 安装在子目录或使用自定义域名,可以在插件设置中修改回调 URL。

最后需要保存 Client ID 和 Client Secret

2. 安装插件

  1. 前往 Github 下载插件:https://github.com/DayuGuo/strava-running-sync
  2. 将插件文件夹上传到 /wp-content/plugins/ 目录;或直接在插件页面上传插件压缩包安装。
  3. 在 WordPress 后台激活插件。

3. 配置插件

  1. 在 WordPress 后台进入「Strava Running」设置页面(侧边栏)
  2. 填入从 Strava 获取的 Client ID 和 Client Secret
  3. 点击「连接到Strava」按钮完成 OAuth 授权
  4. 配置显示选项(地图样式、自动同步等)
  5. 点击「立即同步」进行首次数据同步
  6. 插件基于 Mapbox,需申请账号并获取 Mapbox Access Token。

使用方法

短代码参数

所有短代码都需要在两侧添加 []

使用 strava_running_display 短代码在页面或文章中显示跑步数据。

支持的参数:

  • type – 显示类型
  • both – 同时显示统计、地图和表格(默认)
  • stats – 仅显示统计信息
  • map – 仅显示地图
  • table – 仅显示数据表格
  • limit – 显示的活动数量(默认50)
  • map_height – 地图高度(默认500px)

示例

技术支持

如遇到问题或需要技术支持,请:

  1. 检查 WordPress 和 PHP 版本兼容性
  2. 确认 Strava API 配置正确
  3. 验证回调 URL 配置
  4. 查看 WordPress 错误日志

开源协议

本插件采用 GPL v2 协议开源。


享受跑步,享受数据!🏃‍♀️💨

#Wordpress #建站 #技术笔记