Home > AI > Backend > Wordpress >

edit_post_link

edit_post_link( string $text = null, string $before = '', string $after = '', int|WP_Post $id, string $class = 'post-edit-link' )

Example: Display edit link wrapped in a paragraph tag, with custom CSS classes on the link itself.

edit_post_link( __( 'Edit', 'textdomain' ), '<p>', '</p>', null, 'btn btn-primary btn-edit-post-link' );

Example: simplest use case

edit_post_link();

Leave a Reply