using images with posts_nav_link
-
I’m having trouble getting images to work with the posts_nav_link function.
I have it set up like this:
<div class="arrowLeft"><?php posts_nav_link('','','<img src="images/arrowLeft" />Previous Entries'); ?></div> <div class="arrowRight"><?php posts_nav_link('','Next Entries<img src="images/arrowRight" />',''); ?></div>The problem is that the images won’t show up. My images are in my template folder>images, but by looking at the source of my webpage it seems it’s looking in the root directory of my site instead of my template folder.
So then I tried adding the php code for getting the url of my template, like this:
<div class="arrowLeft"><?php posts_nav_link('','','<img src="<?php bloginfo('template_url'); ?>/images/arrowLeft" />Previous Entries'); ?></div>But doing this gives me a syntax error, unexpected T_STRING. Does anyone know how I can get this to work? Thanks for your help.
The topic ‘using images with posts_nav_link’ is closed to new replies.