Title: link_target_meta_box
Published: April 25, 2014
Last modified: May 20, 2026

---

# link_target_meta_box( object $link )

## In this article

 * [Parameters](https://developer.wordpress.org/reference/functions/link_target_meta_box/?output_format=md#parameters)
 * [Source](https://developer.wordpress.org/reference/functions/link_target_meta_box/?output_format=md#source)
 * [Related](https://developer.wordpress.org/reference/functions/link_target_meta_box/?output_format=md#related)
 * [Changelog](https://developer.wordpress.org/reference/functions/link_target_meta_box/?output_format=md#changelog)

[ Back to top](https://developer.wordpress.org/reference/functions/link_target_meta_box/?output_format=md#wp--skip-link--target)

Displays form fields for changing link target.

## 󠀁[Parameters](https://developer.wordpress.org/reference/functions/link_target_meta_box/?output_format=md#parameters)󠁿

 `$link`objectrequired

Current link object.

## 󠀁[Source](https://developer.wordpress.org/reference/functions/link_target_meta_box/?output_format=md#source)󠁿

    ```php
    function link_target_meta_box( $link ) {

    	?>
    <fieldset><legend class="screen-reader-text"><span><?php _e( 'Target' ); ?></span></legend>
    <p><label for="link_target_blank" class="selectit">
    <input id="link_target_blank" type="radio" name="link_target" value="_blank" <?php echo ( isset( $link->link_target ) && ( '_blank' === $link->link_target ) ? 'checked="checked"' : '' ); ?> />
    	<?php _e( '<code>_blank</code> &mdash; new window or tab.' ); ?></label></p>
    <p><label for="link_target_top" class="selectit">
    <input id="link_target_top" type="radio" name="link_target" value="_top" <?php echo ( isset( $link->link_target ) && ( '_top' === $link->link_target ) ? 'checked="checked"' : '' ); ?> />
    	<?php _e( '<code>_top</code> &mdash; current window or tab, with no frames.' ); ?></label></p>
    <p><label for="link_target_none" class="selectit">
    <input id="link_target_none" type="radio" name="link_target" value="" <?php echo ( isset( $link->link_target ) && ( '' === $link->link_target ) ? 'checked="checked"' : '' ); ?> />
    	<?php _e( '<code>_none</code> &mdash; same window or tab.' ); ?></label></p>
    </fieldset>
    <p><?php _e( 'Choose the target frame for your link.' ); ?></p>
    	<?php
    }
    ```

[View all references](https://developer.wordpress.org/reference/files/wp-admin/includes/meta-boxes.php/)
[View on Trac](https://core.trac.wordpress.org/browser/tags/7.0/src/wp-admin/includes/meta-boxes.php#L1228)
[View on GitHub](https://github.com/WordPress/wordpress-develop/blob/7.0/src/wp-admin/includes/meta-boxes.php#L1228-L1244)

## 󠀁[Related](https://developer.wordpress.org/reference/functions/link_target_meta_box/?output_format=md#related)󠁿

| Uses | Description | 
| [_e()](https://developer.wordpress.org/reference/functions/_e/)`wp-includes/l10n.php` |

Displays translated text.

  |

## 󠀁[Changelog](https://developer.wordpress.org/reference/functions/link_target_meta_box/?output_format=md#changelog)󠁿

| Version | Description | 
| [2.6.0](https://developer.wordpress.org/reference/since/2.6.0/) | Introduced. |

## User Contributed Notes

You must [log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fdeveloper.wordpress.org%2Freference%2Ffunctions%2Flink_target_meta_box%2F)
before being able to contribute a note or feedback.