WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Calling image from template in next/previous_posts_link (2 posts)

  1. Dave P.
    Member
    Posted 5 years ago #

    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?

  2. Dave P.
    Member
    Posted 5 years ago #

    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>

Topic Closed

This topic has been closed to new replies.

About this Topic