Instead of $postId try get_the_ID() or just leave it blank. Let me know whether or not that works and maybe post some code next time? We don’t have good code pasting abilities here but pastie.org / pastebin.com or gist.github.com are good options.
Jonah, thanks, “get_the_ID()” works.
Just a follow up, I am trying to replace zip/postcode with an area, for example postcodes beginning with “SW” become “south west” and postcodes beginning with “N” are “north”.
using the get_the_ID() I’ve come up with this: https://gist.github.com/2951455
For some reason it’s not outputting anything though. Any idea what might be wrong with it?
I’m no PHP expert but $postcode is not an array so I don’t think you can reference $postcode[‘id’] like that. $postcode is just a plain variable and you are assigning it the value of tribe_get_zip() so it’s just going to be the zip code, not an array. Does that help?