wordpress //bloginfo\ function not echoing output on parts of the pages

im having a bit of a problem with php bloginfo ive never had before with with wordpress….not sure how to go about it.

normally i use <?php bloginfo('template_directory'); ?>/rest of link 4 img here

Read More

but for some reason now it doesn’t work. when i view source, its not echoing out the link like its supposed to and it just comes out as "src="/images/pic name here"

ive tried using get_bloginfo('stylesheet_directory'); etc

i even saw some post here on SO that tried to somehow concatenate the get_bloginfo with the link like this

And again, the weird thing is that i define my external assets the same way.
like this for example

<link rel="stylesheet" href="<?php bloginfo('template_directory'); ?>/scripts_n_css/css/default.css" type="text/css" media="screen" />

any ideas as to whats going on? Thanks in advanced.

EDIT*** So if you take a look at this site im working on, http://www.islandlivingpatio.com/?page_id=48 the images dont load up. When i inspect with FireBug, it says “failed to load given url”
but the thing works on my local host.

This is what the sites image and the url it goes to look like.

<a href="<?php echo bloginfo('url');?>/?page_id=775"><img src="<?php bloginfo("template_directory");?>/images/Lynx.gif" alt="castandtubular"/></a>

And again, theY DO work on my local machine. When you click that images alt tag(since its the only thing showing up” then the next page also fails to load the images.

Any ideas as to whats going on?

Related posts

Leave a Reply

2 comments

  1. When you’re using get_bloginfo(), you have to actually echo the output like so:

    <?php echo get_bloginfo('stylesheet_directory'); ?>
    

    Note the “echo” before “get_bloginfo()”.