Donate using PayPal

CycleStreets blog

News from CycleStreets

Run a listings site? Add automatic ‘Cycle there’ links!


Plings is a great site helping young people (13-19 yr olds) discover amazing activities and inspiration.

They've added a great new feature to their site, which adds automatic but customised 'Cycle there' links to every one of their listings! (And of course, young people are exactly the kind of people we want to see getting on their bikes more!)

If you run a listings site of any kind, it's really simple to add this to your site too!

Just make your page generate a link like this:

or, if you optionally have a building/street name, like this: + Postcode (URL encoded) + / + Name (optional, URL encoded) + /

If your site uses the language PHP, this would be as follows, using $postcode and $placename as your content values:


// Cycle there link (to CycleStreets) - with postcode and place name shown when the user gets to CycleStreets site
echo '<p><a href="' . urlencode (strtolower ($postcode)) . '/' . urlencode (urlencode ($placename)) . '/">Cycle there (CycleStreets)</a></p>';

// or:

// Cycle there link (to CycleStreets) - with postcode shown when the user gets to CycleStreets site
echo '<p><a href="' . urlencode (strtolower ($postcode)) . '/">Cycle there (CycleStreets)</a></p>';


The result is a nice, user-friendly page with the destination already filled in!

Journey to ... example

If you have any other kind of website, e.g. one for your organisation, you can also make a 'cycle to us' link or badge for its contact page – read more.

Link box

7 Responses to “Run a listings site? Add automatic ‘Cycle there’ links!”

  1. Tweets that mention CycleStreets » Blog -- Says:

    […] This post was mentioned on Twitter by Andy Mabbett and others. Andy Mabbett said: RT @cyclestreets: Do you run a listings site? Add automatic ‘Cycle there’ links to your listings! < @philipjohn Timely […]

  2. Gregory Williams Says:

    I wonder whether adding the ability to also navigate to a lat/lon would be useful too. The cycle rides in our listings have a lat/lon for their start location and it'd be useful to link to CycleStreets for journey planning purposes.

  3. martin Says:

    Good idea, and I've certainly needed that myself sometimes. I'll code it up shortly and let you know!

  4. Martin Says:

    Gregory – try now! Have added experimental support for lat,lon in the URL, like this:,0.117061/

  5. Gregory Marler Says:

    This is a better post for explaining the concept. But readers may want to be aware of the imporvements detailed at

  6. Living with Dragons » So new it doesn’t have a postcode… Says:

    […] worth noting that OpenStreetMap data is also used in places such as CycleStreets (see their links advice, hiking maps, various phone map apps, a Toilet Map, and so many other uses I constantly lose […]

  7. Administrator for Wordpress Says:

    @Gregory Marler, #5:

    Yes, we'll be creating a permanent page in the /link/ section soon which effectively merges the two blog posts into permanent and well-explained documentation.

We welcome your feedback, especially to report bugs or give us route feedback.

My comments relate to: *

Your comments: *
URL of page: *
How did you find out about CycleStreets?:
Your name:
Our ref: Please leave blank - anti-spam measure

* Items marked with an asterisk [*] are required fields and must be fully completed.