Viewing 2 replies - 16 through 17 (of 17 total)
  • Plugin Author Phi Phan

    (@mr2p)

    Thank you @baxter89 for the review video :). I really appreciate your support.

    For anyone reading this thread, you can also create a link to your liking by using the filter described in this thread.

    For example, here is what I did. (I did not use ACF to register my field, just PHP.)

    add_filter( 'meta_field_block_get_block_content', function ( $content, $attributes, $block, $post_id ) {
        $field_name = $attributes['fieldName'] ?? '';
        
        if ( $field_name === '_my_url_field') {
          $content = '<a href="' . $content . '">' . $content . '</a>';
        }
        
        return $content;
      }, 10, 4);

    Of course, replace _my_url_field with your own field’s name.

Viewing 2 replies - 16 through 17 (of 17 total)
  • The topic ‘URL’ is closed to new replies.