SitePoint Sponsor

User Tag List

Results 1 to 2 of 2

Thread: Best way to use images for Next and Previous links in Wordpress

Hybrid View

  1. #1
    SitePoint Addict
    Join Date
    Sep 2009
    Posts
    297
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Best way to use images for Next and Previous links in Wordpress

    What's the best way (or any working way) to use images with the next and previous links in Wordpress. I tried this and it doesn't work:

    PHP Code:
    <?php previous_posts_link('<img src="<?php bloginfo('template_url'); ?>/images/right-arrow.png">'); ?>
    Suggestions on how to address this or fix the code above?

  2. #2
    SitePoint Wizard
    Join Date
    Oct 2007
    Location
    Boston, MA
    Posts
    1,361
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    check that you have <?php inside the first <?php
    same for closing ?>

    <?php
    previous_posts_link('<img src="'. bloginfo('template_url') .'/images/right-arrow.png">');
    ?>

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •