WordPress.org

Ready to get started?Download WordPress

Forums

posts_nav_link using images (4 posts)

  1. crazyfish
    Member
    Posted 5 years ago #

    I'm trying to use images for the next page and prev page links but I'm not very good with PHP so I think I am messing something up. If I put the relative path to the template the images work but if I try to call the images based on the template folder it fails. I'm trying to get the below code to work:

    <?php posts_nav_link(' ','<img src="<?php bloginfo('template_directory'); ?>/images/left.png" />','<img src="<?php bloginfo('template_directory'); ?>/images/right.png" />'); ?>

  2. crazyfish
    Member
    Posted 5 years ago #

    No one has tried this before??

  3. crazyfish
    Member
    Posted 5 years ago #

    I'm hoping to find an answer to this.

  4. fas.khan
    Member
    Posted 5 years ago #

    I know I am late. I was searching for it. When I found this thread, I knew that I have to do something like above.

    So here is how I did it.

    $prevlink= '<img src='.get_bloginfo('template_url').'/images/menus/right.gif border=0 />';
    						$nextlink= '<img src='.get_bloginfo('template_url').'/images/menus/down.gif border=0 />';
    						posts_nav_link(' ',$prevlink,$nextlink);

Topic Closed

This topic has been closed to new replies.

About this Topic