Using template tags within PHP pages
-
I’ve installed a plugin that allows me to use PHP without my posts and pages. What I would like to do now is to use some template tags (such as <?php bloginfo(‘url’); ?>) within my pages, so that I don’t have to type out full URLs all over the place and can have everything relative to my WordPress base URL.
This is probably a very simple question but I was unable to find the answer by searching, possibly because I wasn’t sure what to search for.
What I need to know is how I can use template tags within PHP pages. For example, I have a script and I would like to use the <?php bloginfo(‘url’); ?> tag without first “leaving” PHP. I tried just using bloginfo(‘url’) on its own at that didn’t work; neither did $bloginfo(‘url’), bloginfo(‘$url’) or {bloginfo(‘url’)}.
Any ideas? Thanks in advance!
- The topic ‘Using template tags within PHP pages’ is closed to new replies.