Event Date variables for Yoast

This topic contains 5 replies, has 3 voices, and was last updated by  James Gird 6 years, 2 months ago.

We have moved to a support ticketing system and our forums are now closed.

Open Support Ticket

Tagged: 

  • Author
    Posts
  • #444647

    James Gird
    Expired Member
    Post count: 33

    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’);

    #444648

    Alex Rollin
    Moderator
    Post count: 27815

    A valid license is required to view this reply.

    You may need to login

    OR

    Buy either a Membership or valid license for this product.

    Thanks, Team GeoDirectory!

    #444683

    James Gird
    Expired Member
    Post count: 33

    A valid license is required to view this reply.

    You may need to login

    OR

    Buy either a Membership or valid license for this product.

    Thanks, Team GeoDirectory!

    #444710

    Alex Rollin
    Moderator
    Post count: 27815

    A valid license is required to view this reply.

    You may need to login

    OR

    Buy either a Membership or valid license for this product.

    Thanks, Team GeoDirectory!

    #444836

    Stiofan O’Connor
    Site Admin
    Post count: 22956

    A valid license is required to view this reply.

    You may need to login

    OR

    Buy either a Membership or valid license for this product.

    Thanks, Team GeoDirectory!

    #444869

    James Gird
    Expired Member
    Post count: 33

    A valid license is required to view this reply.

    You may need to login

    OR

    Buy either a Membership or valid license for this product.

    Thanks, Team GeoDirectory!

Viewing 6 posts - 1 through 6 (of 6 total)

We have moved to a support ticketing system and our forums are now closed.

Open Support Ticket
20% Discount Offer
Hurry! Get your 20% discount before it expires. Get 20% Discount