Make a shortcode echo in the middle of an URL in HREF
Posted
by
Liso22
on Stack Overflow
See other posts from Stack Overflow
or by Liso22
Published on 2010-12-25T19:49:09Z
Indexed on
2010/12/25
19:54 UTC
Read the original article
Hit count: 212
The shortcode [mmjs-city] echoes the city the user is in.
I want to make a link that takes the user to a results page with the user's city as search term. Basically the URL should be the results page URL + the result of the shortcode (the city).
I tried to write it this way:
Search for your city
Normally I would just use PHP and assign the city to a value but I'm in a page not the theme and PHP doesn't work on pages for some reason, most likely It's possible but I don't know how. Anyway, anybody knows how could I do it? Thanks and merry christmas
© Stack Overflow or respective owner