matty44m Posted March 11, 2012 Share Posted March 11, 2012 Hey every i'm just trying to change my 'Read More' text after a blog post on my site into am image. Got some code that lets me change the actual text to something else, just can't find how to change the text into an image. add_filter( 'the_content_more_link', 'child_content_more_link', 10, 2 ); function child_content_more_link( $more_link, $more_link_text ) { return str_replace( $more_link_text, 'my new read more text', $more_link ); } Thanks, Matty44m Quote Link to comment https://forums.phpfreaks.com/topic/258670-images-in-php/ Share on other sites More sharing options...
trq Posted March 11, 2012 Share Posted March 11, 2012 return str_replace( $more_link_text, '<img src="somimage.jpg">', $more_link ); Quote Link to comment https://forums.phpfreaks.com/topic/258670-images-in-php/#findComment-1326034 Share on other sites More sharing options...
matty44m Posted March 11, 2012 Author Share Posted March 11, 2012 Thanks for that Thorpe, tried putting html just right in there like that but for some reason wasn't working... Must had cocked something up. But all working fine now. Quote Link to comment https://forums.phpfreaks.com/topic/258670-images-in-php/#findComment-1326040 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.