Wed 9 Jul 2008
AnyVar is a simple text search and replace plugin allowing you to implement variables (text snippets) anywhere in WordPress – posts, pages, themes, links, widgets etc.
All you need to do is add the given variable on the AnyVar admin page, then copy the [variable_tag] into your html code. You can use the same variable(s) anywhere on your blog, as many times as you like.
As shown above, some example uses include affiliate ids, ads, changing names, thoughts of the day/week/month – any text that needs to be changed.
For more information see the AnyVar homepage & the Download page.


(29 votes, average: 3.45 out of 5)
Hello, thanks but fatal error when activating with my wordpress 2.5.1:
“Parse error: syntax error, unexpected T_STRING, expecting T_OLD_FUNCTION or T_FUNCTION or T_VAR or ‘}’ in /[...]/wp-content/plugins/anyvar/anyvar.php on line 19
The most likely problem is you’re using PHP4… I probably should’ve made it backwards compatible, but it’s less than two months until support for version 4 ends completely…
I like the concept and it works as it is designed. One thing that would be nice is if I could limit it to 10 times per instance. So if I want to use the var name of “cat” twice, it would do it 10 times for the first cat and 10 times for the second cat and so on. Is that too complicated?
Does this filter the content at display time or alter it before a save?
This would be great for “donate” links — the PayPal one (for example) is a great big chunk of random-looking characters.
Anyway, I hope this is filter-based, as then we can change the var later and it will propagate.
I will check it out!
FYI — Your homepage link is incorrect.