Controls
URL
URL control is used to store a url string value for the block. See examples below to use this control.
URL control supports searching by the available blog posts and pages, just type the name of the page and you will see options:
Control Settings
- Link Suggestions – select which suggestions to display when typing URL
- Show Initial Suggestions – show suggestions on load, not only after typing
- Rich Preview – display rich link preview with site title and image
Usage
PHP
<p>
Your link is:
<a href="<?php echo esc_url( $attributes['control_name'] ); ?>"><?php echo esc_html( $attributes['control_name'] ); ?></a>
</p>
Handlebars
<p>
Your link is:
<a href="{{control_name}}">{{control_name}}</a>
</p>
Post Meta
<p>
Your link is:
<a href="<?php echo esc_url( get_lzb_meta( 'control_meta_name' ) ); ?>"><?php echo esc_html( get_lzb_meta( 'control_meta_name' ) ); ?></a>
</p>