![]() |
PHP / Wordpress Pros .. Please help!
I'm using the following on the single.php template file for post navigation:
<?php next_post_link('%link', '<img src="/images/next.gif" width="75" height="21" border="0">', FALSE); ?> Works fine, but what I actually want to do is insert <?php bloginfo('template_directory'); ?> before the /images/next.gif. I know I can't simply do: <?php next_post_link('%link', '<img src="<?php bloginfo('template_directory'); ?>/images/next.gif" width="75" height="21" border="0">', FALSE); ?> So hook can someone hook me up with the right format please? I don't want to learn php I just want to finish this damn template I started. :P |
Why don't you just insert the URL of your template's directory?
ie: <?php next_post_link('%link', '<img src="http:// www . domain . com /wp-content/ themes/ template/ images/ next.gif" width="75" height="21" border="0">', FALSE); ?> |
Quote:
|
What about:
<?php next_post_link('%link', '<img src="' . bloginfo('template_directory') . '/images/next.gif" width="75" height="21" border="0">', FALSE); ?> |
try swishs` version... should work
|
Quote:
Anyone else? |
try
Code:
<?php |
Unfortunately that does the same thing as the earlier code. There's something peculiar about this Wordpress function.
Anyone familiar with it? |
<?php next_post_link('%link', '<img src=<?php bloginfo('template_directory'); ?>/images/next.gif width=75 height=21 border=0>', FALSE); ?>
|
possibly the " " symbols were messing it up ?
|
Use this instead:
<?php next_post_link('%link', '<img src="' . get_bloginfo('template_directory') . '/images/next.gif" width="75" height="21" border="0">', FALSE); ?> More help: http://codex.wordpress.org/Template_Tags/get_bloginfo |
All times are GMT -7. The time now is 01:36 AM. |
Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2025, vBulletin Solutions, Inc.
©2000-, AI Media Network Inc123