• Resolved Dave P.

    (@callmedpit)


    I’m trying to call an image from my template, to use in the next/previous page links. This is what I’ve got:

    <div id="pagination">
    			<ul>
    				<li class="prev"><?php previous_posts_link('<img src="images/pagination_prev.gif" alt="Previous page" title="Read the previous page" />') ?></li>
    				<li class="next"><?php next_posts_link('<img src="images/pagination_next.gif" alt="Next page" title="Read the next page" />') ?></li>
    			</ul>
    		</div>

    How can I add something like the <?php bloginfo(‘template_url’); ?> to this so that it will actually call the image URL at the right place?

Viewing 1 replies (of 1 total)
  • Thread Starter Dave P.

    (@callmedpit)

    Got it, figured out how to append the template_url:

    <div id="pagination">
    
    <ul>
    				<li class="prev"><?php previous_posts_link('<img src="' . get_bloginfo(template_url) . '/images/pagination_prev.gif" alt="Previous page" title="Read the previous page" />') ?>
    				<li class="next"><?php next_posts_link('<img src="' . get_bloginfo(template_url) . '/images/pagination_next.gif" alt="Next page" title="Read the next page" />') ?>
    			</ul>
    		</div>
Viewing 1 replies (of 1 total)
  • The topic ‘Calling image from template in next/previous_posts_link’ is closed to new replies.