开发者

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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜