![]() | | ||||||||
| | #1 |
| Solotr Join Date: Jan 2007 Location: , , USA.
Posts: 49
Thanks: 38
Thanked 2 Times in 2 Posts
|
Hello Warriors, I'm not sure what to do with this coding: <a href="#" rel="bookmark" title="Permanent Link to yoursite.com"> <img src="<?php bloginfo('template_directory'); ?>/images/ad1.gif" /></a> I can put in the first tag, no problem it's straight html but how do I use the second half? I know how to use <img src="whatever"> in html, but am I supposed to split the code like this: <img src="humptydumpty"><?php bloginfo('template_directory'); ?>/images/egg.gif" /> Or is this part: <?php bloginfo('template_directory'); ?> in the wrong place? If it was html, here's how I'd handle it: <img src="humptydumpty.com"/images/egg.gif" /> Hope this makes sense. I've been playing with it all day and my blog isn't finished until I figure this out (with a little help from my friends ![]() Thank you |
|
Most of us aren't interested in getting rich --we just don't want to get poor.~Andy Rooney
| |
| | |
| | #2 |
| HyperActive Warrior Join Date: May 2008 Location: USA
Posts: 249
Blog Entries: 22 Thanks: 9
Thanked 29 Times in 27 Posts
|
Hello solotr, Your first example looks correct to me, but remember that you cannot call PHP code from inside a post or page in WordPress. That is reserved for actual PHP files, such as editing your theme or creating your own PHP files on your web server. Take a look at this blog post for a WP plugin to allow execution of PHP inside a post or page. Execute PHP in Wordpress post, page and Widget Sidebar | Wordpress Let me know if that helps. Thank you. |
| Exciting comment opportunities on my WF blog: (1) Better money with better marketing (2) Forming strong customer bonds (3) Earn more money with DB marketing (4) Building a revenue and profit model | |
| | |
| | #3 |
| Senior Warrior Member War Room Member Join Date: Sep 2008 Location: Honolulu, Hawaii, USA & Montreal Canada
Posts: 2,218
Blog Entries: 1 Thanks: 759
Thanked 724 Times in 505 Posts
|
The PHP expression "<?php bloginfo('template_directory'); ?>" is a variable that represents the full path to your blogs theme folder. If you wanted to strip out the PHP and just use HTML you could replace this expression with something like "http://myblogurl.com/public_html/wp-...hemes/mytheme/" .
|
| | |
| | #4 |
| Solotr Join Date: Jan 2007 Location: , , USA.
Posts: 49
Thanks: 38
Thanked 2 Times in 2 Posts
|
Sorry it took me this long to reply, I moved Also changed hosts, removed that theme and learning php.
|
|
Most of us aren't interested in getting rich --we just don't want to get poor.~Andy Rooney
| |
| | |
| | #5 |
| A rat after money... War Room Member Join Date: Jul 2009 Location: Inside a cheese...
Posts: 598
Thanks: 363
Thanked 54 Times in 47 Posts
|
I build my template the way I like it. It has multiple files that in the end combines to the full layout. Like multiple CSS and template files. |
| | |
| | |
![]() |
|
| Tags |
| blog, image, php, php learning help, problem |
| Thread Tools | |
| |
![]() |