Wordpress Themes - WP Forum at BFA

Wordpress Themes - WP Forum at BFA (http://forum.bytesforall.com/index.php)
-   Atahualpa 3 Wordpress theme (http://forum.bytesforall.com/forumdisplay.php?f=2)
-   -   [SOLVED] Problems with dynamic links (http://forum.bytesforall.com/showthread.php?t=12113)

rjh4242 Jan 9, 2011 02:15 AM

[SOLVED] Problems with dynamic links
 
I have been trying to replace my hardcoded links with dynamic ones, preparatory to moving hosts.

For example, I am using:

Code:

background: #ffffff url(/rogo/httpdocs/wp-content/themes/atahualpa/images/rogo/bg01.jpg);
in the Body Style box. This works perfectly, giving me the background image as intended.

However if I replace it with:

Code:

background: #ffffff url(<?php echo get_bloginfo('template_directory'); ?>/images/rogo/bg01.jpg);
which I think should give the same result, I get a black background and no image. I'm assuming that this means that Wordpress can't find the image, so something is wrong with my use of the function.

I have copied the php function into the footer content to test it, and when used there it comes up with the right directory - http:// localhost/rogo/httpdocs/wp-content/themes/atahualpa (the extra space is just to stop this post coding the link automatically as a URL). But for some reason the function doesn't seem to be working correctly when I put it in a link.

What am I doing wrong? All suggestions welcome!

juggledad Jan 9, 2011 03:39 AM

hold off on using 3.6 for the moment. you can manual install 3.5.3 (http://forum.bytesforall.com/showthread.php?t=8520) and activate it (having it in a folder called atahualpa353) and have 36 installed at the same time. Just switchback to 3.5.3 till the issue with 3.6 is figured out.

rjh4242 Jan 9, 2011 11:10 PM

Aha, I hadn't realised it was a 3.6 related problem. Gone back to 3.5.3 as suggested and it works perfectly.
Thanks :)


All times are GMT -6. The time now is 07:17 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.