Use image as “Edit post” button
-
Hi!
I want to use an image instead of text for the “Edit post” link in my theme.
When I useedit_post_link('', '', '');
it still gives me some HTML tags, thus I can’t use it as image link.This is also not working:
<?php edit_post_link('<img src="'.bloginfo('stylesheet_directory').'/icons/page_edit.png" title="Edit this page">', '', ''); ?>
because the “bloginfo()” function echo’s its text and doesn’t return it as string.I also tried to do it manually, but this isn’t working either, the “the_ID()” function returns nothing (“”): `/wp-admin/page.php?action=edit&post=<?php the_ID(); ?>”>
<img src=”<?php bloginfo(‘stylesheet_directory’); ?>/icons/page_edit.png” title=”Edit this page”>`What can I do? Please help!
- The topic ‘Use image as “Edit post” button’ is closed to new replies.