How would I format this correctly? I know I can’t open a php statement inside an existing one but I’m not sure how to correct it.
echo '<img src="<?php echo dirname( get_bloginfo('stylesheet_url') ); ?>/images/isa.jpg" alt="ISA">';
How would I format this correctly? I know I can’t open a php statement inside an existing one but I’m not sure how to correct it.
echo '<img src="<?php echo dirname( get_bloginfo('stylesheet_url') ); ?>/images/isa.jpg" alt="ISA">';
You must be logged in to post a comment.
Like this:
do it like this
I prefer to use PHP’s
printf()
andsprintf()
for that. It’s easier to visualize the HTML and we just need to fill it with%s
and their corresponding build up.IT is better to use get_template_directory_uri() rather than get_bloginfo(). You can use following code: