There’re lots of examples both here and on the internet, I’ve tried but don’t seem to be able to achieve what I need although it does feel like it should be simple enough.
Basically, I want to be able to use a shortcode like this:
[download]http://site.com/file.doc[/download]
and I need WordPress to output this:
<a class="download" href="http://site.com/file.doc">download file</a>
<a class="download" href="http://docs.google.com/viewer?embedded=true&url=http://site.com/file.doc">preview file</a>
Your help would be greatly appreciated. Thanks so much!
1 comment