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' );
Add custom Yoast variables. Code example
Approved. Code works!
This is exactly the working code that is verified by the moderator or site administrators
More
lil-code© | 2022 - 2024
Go Top