Title: edit Link
Last modified: February 21, 2021

---

# edit Link

 *  Resolved [rvnd](https://wordpress.org/support/users/rvnd/)
 * (@rvnd)
 * [5 years, 3 months ago](https://wordpress.org/support/topic/edit-link-9/)
 * Hi
 * I’d like to create an edit link on all Lazyblocks.
 * I am trying to do it this way and was hoping you could tell me how to replace“
   XXX” with the Post ID of the Lazy Block.
 *     ```
       function my_lzb_block_render_callback( $result, $attributes, $context ) {
           return '<a href="/wp-admin/post.php?post=XXX&action=edit" target="_blank">Edit LazyBlock</a>';
       }
       add_filter( 'lzb/block_render/callback', 'my_lzb_block_render_callback', 10, 3 );
       ```
   

Viewing 1 replies (of 1 total)

 *  Plugin Author [nK](https://wordpress.org/support/users/nko/)
 * (@nko)
 * [5 years, 3 months ago](https://wordpress.org/support/topic/edit-link-9/#post-14106361)
 * Hey.
 * Something like this one should work:
 *     ```
       <?php
   
       $block_data = lazyblocks()->blocks()->get_block( $attributes['lazyblock']['slug'] );
   
       if ( isset( $block_data['id'] ) ) {
         echo 'ID: ' . esc_html( $block_data['id'] );
       }
       ```
   
 * Regards, nK.

Viewing 1 replies (of 1 total)

The topic ‘edit Link’ is closed to new replies.

 * ![](https://ps.w.org/lazy-blocks/assets/icon-256x256.png?rev=2584676)
 * [Custom Block Builder - Lazy Blocks](https://wordpress.org/plugins/lazy-blocks/)
 * [Support Threads](https://wordpress.org/support/plugin/lazy-blocks/)
 * [Active Topics](https://wordpress.org/support/plugin/lazy-blocks/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/lazy-blocks/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/lazy-blocks/reviews/)

 * 1 reply
 * 2 participants
 * Last reply from: [nK](https://wordpress.org/support/users/nko/)
 * Last activity: [5 years, 3 months ago](https://wordpress.org/support/topic/edit-link-9/#post-14106361)
 * Status: resolved