Would it be possible to assist with a code snippet to create custom yoast variables for Yoast containing the event start date and then also the end date. Similar to the code below.
If you can I and others should also be able to use that to extend the snipped or create more to pull other GD custom fields into yoast.
This would be greatly appreciated since the lack of a way to pull GD custom fields into yoast is a big SEO disadvantage.
(Please also consider to in future build into geodirectory the creation of yoast variables for all the GD SEO variables under Geodirectory->Titles & Metas.)
Warm Regards
James
CODE EXAMPLE
// define the custom replacement callback
function get_myname() {
return ‘My name is Moses’;
}
// define the action for register yoast_variable replacments
function register_custom_yoast_variables() {
wpseo_register_var_replacement( ‘%%myname%%’, ‘get_myname’, ‘advanced’, ‘some help text’ );
}
// Add action
add_action(‘wpseo_register_extra_replacements’, ‘register_custom_yoast_variables’);