WordPress edit article link tag: Edit_ post_ link

WordPress template tags edit_ post_ Link is used to output the link to edit the article. It must be used in the main loop of the loop.

edit_post_link( string $text = null, string $before = '', string $after = '', integer $id = 0, string $class = 'post-edit-link' )

Function parameters


String value, null by default

Anchor text for links


String value, null by default

Text output before linking


String value, null by default

Text output after link


Integer type, default value: 0

Specify the article ID and output the edit link of the article.


String value, default value: Post edit link

The class name of the link

Examples of function usage

<?php edit_post_link('编辑', '<p>', '</p>'); ?>

Extended reading

edit_ post_ The link() function is located in: WP includes / link- template.php

Related Tags:

  • edit_ comment_ link()
  • edit_ tag_ link()
  • edit_ bookmark_ link()
Related Article
WordPress comment date tag: comment_date

WordPress template tags comment_ Date is used to output the date of a comment, usually in a custom comment template. Read more

WordPress comment summary tag: comment_excerpt

WordPress template tags comment_ Excerpt is used to output the summary of comments. The default output is 20 characters. It Read more

WordPress comment time tag: comment_time

WordPress template tags comment_ Time is used to output the publishing time of the current comment, which is the same Read more

WordPress RSS format comment author name tag: comment_author_rss

WordPress template tags comment_ author_ RSS is used to output the comment author name in RSS format, which has no Read more

Leave a Reply

Your email address will not be published. Required fields are marked *

To prove you're a person (not a spam script), type the security word shown in the picture.
Anti-spam image