Return doesn't put variable where it belongs
-
I have created a function that returns a string of HTML. Problem is, I am using
bloginfo("template_url")to get the path to an images folder inside my theme. The result of bloginfo() gets output outside the HTML created by the function. Why is this, and how do I fix it?Here is my code:
function build_upperfooter() { $upperfooter_output = ' <div id="upper_footer"> <div id="upper_footer_content"> <ul> <li class="social"><img src="' . bloginfo("template_url") . '/images/facebook_icon.png" alt="visit our facebook page" /><a targe="_blank" href="http://www.facebook.com/mattandjentry">Facebook</a></li> <li class="social"><img src="' . bloginfo("template_url") . '/images/twitter_icon.png" alt="visit our twitter feed" /><a targe="_blank" href="http://twitter.com/#!/mattandjentry">Twitter</a></li> <li class="social"><img src="' . bloginfo("template_url") . '/images/pinterest_icon.png" alt="visit our pinterest boards" /><a targe="_blank" href="http://pinterest.com/jentrydryden/">Pinterest</a></li> <li class="address">1451 Alvin Ct. * Sparks, NV 89434 | 775.332.9807</li> </ul> </div> <p class="copyright">© <?php echo date("Y") ?> Matt and Jentry: Photographers, LLC</p> </div>'; return $upperfooter_output; }and here is a link to my dev site which currently shows the results: http://mattandjentry.com/test/weddings/
Viewing 5 replies - 1 through 5 (of 5 total)
Viewing 5 replies - 1 through 5 (of 5 total)
The topic ‘Return doesn't put variable where it belongs’ is closed to new replies.