I am attempting to change what is currently PHP-generated text links into image links.
This is the navigation on my index page to show previous posts or next posts if there are some available, so it is not a static image link.
Here is the original code:
<div class="next"><?php previous_posts_link( __( '‹ Newer Posts', 'imbalance2' ) ); ?></div>
<div class="previous"><?php next_posts_link( __( 'Older Posts ›', 'imbalance2' ) ); ?></div>
I want to change the arrows (‹ + ›) with the text into just png images I made.
Here was one of my attempts.
<div class="next"><?php previous_posts_link( __( <?php echo "<img src="wp-content/images/srnewerposts.png" /></a>"; ?> ) ); ?></div>
<div class="previous"><?php next_posts_link( __( <?php echo "<img src="wp-content/images/srolderposts.png" /></a>"; ?> ) ); ?></div>
This generates an error:
Parse error: syntax error, unexpected '<', expecting ')'
I originally tried just to put the file path without the php echo tag, but it did not expect the / at the beginning of my path.
I've made many searches, but was not able to find something that helps.