Home / Admin / Add WPCode Permalink Smart Tag
Duplicate Snippet

Embed Snippet on Your Site

Add WPCode Permalink Smart Tag

Add a custom smart tag for WPCode to output the value of the current page permalink.

Code Preview
add_filter( 'wpcode_smart_tags', function( $tags ) {
	$tags['custom'] = array(
		'label' => 'Custom',
		'tags'  => array(
			'permalink' => array(
				'label' => 'Permalink',
				'function' => 'wpcode_custom_permalink_tag',
	return $tags;
} );
function wpcode_custom_permalink_tag() {
	// Replace custom_field_tag below with the meta key of your custom field.
	return get_permalink();


Add a Comment