Wordpress - image's absolute path within a function
I'm developing a wordpress theme for general release. I want to display an image beside the "previous post/next post" (if there the function is true), however, relative paths aren't showing up. Here's the code:
<?php previous_posts_link(__( 'Newer posts <i开发者_开发知识库mg src="/wp-content/themes/basix/images/icons/arrow_right.gif" alt="previous post icon" />', 'basix' )) ?>
The image doesn't show up, removing the first forward slash also doesn't work. I was trying to use absolute paths using bloginfo('stylesheet_directory')
, but this function just outputs the html characters, seperate from the link.
Use get_bloginfo() not bloginfo() - get_bloginfo() returns the value as bloginfo() echo'es it.
精彩评论