Linux 软件免费装
Banner图

PTD GTFS Schedules

开发者 icptd
更新时间 2026年10月31日 00:37
PHP版本: 8.1 及以上
WordPress版本: 7.1
版权: GPLv2 or later
版权网址: 版权信息

标签

schedules timetable transit public transport gtfs

下载

0.3.2

详情介绍:

PTD GTFS Schedules turns the GTFS feed of a transport operator or authority into timetables on their WordPress site. Import the feed once, add a block to a page, and the timetables stay current as the feed is updated. What it shows For riders For editors and admins Shortcodes Supported GTFS The plugin reads agency.txt, stops.txt, routes.txt, trips.txt, stop_times.txt, calendar.txt and calendar_dates.txt, including extended route types, times after midnight and stations with several platforms. Trips described only with frequencies.txt are not shown yet, and the times are the scheduled ones (no GTFS Realtime). Feedback Something does not work, or a feature is missing? Open an issue on GitHub or write to contact@publictransitdata.net.

安装:

  1. Install and activate the plugin.
  2. Open GTFS Schedules in the admin menu. Enter the address of your GTFS feed, or upload its .zip file, and import it.
  3. Add the Lines block to a page, for example the home page.
  4. Create one page with the Line timetable block. Every Lines block on the site links to it.
  5. To show a single stop, look it up under Find a stop and paste its shortcode into any page.

屏幕截图:

  • The Lines block, grouped by transport mode.
  • A departure board.
  • The admin page: feed settings and import.

常见问题:

Where do I get a GTFS feed?

Many transport authorities publish theirs as open data, you can export a GTFS feed from your scheduling system, or contact us: we can help your company or municipality create and maintain one.

My feed is larger than the upload limit.

Import it from its public address instead, or with WP-CLI on the server: wp ptd-gtfs-schedules import --file=feed.zip.

How often is the timetable updated?

As often as you choose in the settings: daily, weekly or manually. Automatic updates import from the feed's address at night through WP-Cron. On sites with little traffic, set up a real cron job for wp-cron.php, or run wp ptd-gtfs-schedules import from the server's cron. Automatic updates replace data imported from an uploaded file.

Can I link lines to my own pages?

Use the ptd_gtfs_schedules_line_url filter to give each line the address you want. The ptd_gtfs_schedules_is_night_line filter decides which lines count as night lines, and the ptd_gtfs_schedules_imported action runs after every import.

How do I credit the data publisher?

Many open data licences require it. Enter the credit under Data source credit in the settings, and it is shown under the timetables.

更新日志:

0.3.2