Add custom Yoast variables. Code example open

Add custom Yoast variables. Code example

Approved. Code works!
This is exactly the working code that is verified by the moderator or site administrators
function register_custom_yoast_variables() {
	wpseo_register_var_replacement( '%%kilkist%%', 'get_kilkist', 'advanced', 'some help text' );
	wpseo_register_var_replacement( '%%myname%%', 'get_myname', 'advanced', 'some help text' );
}

add_action( 'wpseo_register_extra_replacements', 'register_custom_yoast_variables' );
0

More

Leave a Reply

Your email address will not be published. Required fields are marked *

How many?: 22 + 22

lil-code© | 2022 - 2024
Go Top
Authorization
*
*
Registration
*
*
*
*
Password generation