Using Wordpress methods in echo - doesn't seem to work correctly?

roos

New Member
Not even sure if methods is the correct terminology...Here is the original working code:\[code\]<a href="http://stackoverflow.com/questions/3760428/<?php bloginfo('url'); ?>"><img src="http://stackoverflow.com/questions/3760428/<?php bloginfo('stylesheet_directory'); ?>/images/logo.png" alt="Polished Logo" id="logo"/></a><img src="http://stackoverflow.com/questions/3760428/<?php bloginfo('stylesheet_directory'); ?>/images/separator.png" width="2" height="59" alt="Line" class="logo_line"/><p id="logo_title"><?php bloginfo('description'); ?></p>\[/code\]I wanted it to only execute on the homepage, so I wrote this:\[code\]<? if ( $_SERVER["REQUEST_URI"] == '/' ){echo '<a href="'.bloginfo('url').'"><img src="'.bloginfo('stylesheet_directory').'/images/logo.png" alt="Polished Logo" id="logo"/></a><img src="'.bloginfo('stylesheet_directory').'/images/separator.png" width="2" height="59" alt="Line" class="logo_line"/><p id="logo_title">'.bloginfo('description').'</p>';}?>\[/code\]But it outputs the \[code\]bloginfo()\[/code\] and the other declarations completely outside the html tags I have created. For instance, with \[code\]bloginfo('stylesheet_directory')\[/code\] it will display the directory outside the \[code\]IMG\[/code\] tags I created.Any ideas? Apparently my syntax isn't correct or something....
 
Back
Top