Wordpress Dynamic Edit Link


/ Published in: PHP
Save to your folder(s)

Wordpress creates an anchor with a class .post-edit-link for styling


Copy this code and paste it in your HTML
  1. <?php if(current_user_can('edit_posts', $post_id) || current_user_can('edit_others_posts')) :
  2. edit_post_link('Edit', '', ''); endif; ?>

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.