WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I want to get the template path to print in this echo of a form in the admin.

Here is what I got:

< ?php echo of_get_option('splash_img_transition', 'bloginfo('template_url')+/images/large/chalk.jpg' ); ?>

The second parameter there is a placeholder if nothing is input into the field that I am echoing.

Normally the echo works like this: < ?php echo of_get_option('splash_img_transition', 'no entry' ); ?>

And of course the WP tag < ?php bloginfo('template_url'); ?>

I'm just trying to combine the two so that the default (if the user does not input anything) will be a path to a placeholder image.

Thanks for any help!

share|improve this question

migrated from stackoverflow.com Jul 17 '11 at 5:34

This question came from our site for professional and enthusiast programmers.

Most Wordpress functions, that generate output, do echo that output by them self. But all those functions are just wrappers for the accordingly get_*-functions.

In your case its bloginfo() and get_bloginfo(), where the second returns the output, so you can use it for whatever you like.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.