Using Tokens in Shortcodes
-
This plugin works great for personalizing pages on my site based on a value in the query-string. I’m using it to create local landing pages for specific town’s I’m going to be advertising to:
https://www2.c2itconsulting.net/where-we-work/local-it-support/?city=Indianapolis&state=Indiana
I’ve got it working for text and images. What I’d like to do now is include the token in a shortcode. For instance, there is a wikipedia article pulling plugin that takes a URL in the shortcode and embedes some of the wikipedia text in your page. This probably won’t be my end use of this, but it’s a good example – the shortcode (with tokens) looks like this:
[wiki-embed url=”https://en.wikipedia.org/wiki/{queryCity},_{queryState}” no-edit no-contents no-infobox accordion]
And I’d like that converted to:
[wiki-embed url=”https://en.wikipedia.org/wiki/Indianapolis,_Indiana” no-edit no-contents no-infobox accordion]
But the token plugin doesn’t seem to be converting the token within the shortcode. Can you help?
Chet
- The topic ‘Using Tokens in Shortcodes’ is closed to new replies.