/ Published in: PHP
Wordpress creates an anchor with a class .post-edit-link for styling
Expand |
Embed | Plain Text
<?php if(current_user_can('edit_posts', $post_id) || current_user_can('edit_others_posts')) : edit_post_link('Edit', '', ''); endif; ?>
Comments
Subscribe to comments
You need to login to post a comment.

The editpostlink will not display unless logged in and allowed to edit posts. There is no reason to add an if statement. editpostlink(__('edit'), '',''); is actually sufficient.
it ate my code,
editpostlink(__('edit'), '','');