Yoast SEO titles with custom fields from Events Calendar

Home Forums Calendar Products Events Calendar PRO Yoast SEO titles with custom fields from Events Calendar

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #1389758
    Johannes Maier
    Participant

    Hi,

    I’d like to display the city and country of my venues in my meta titles.
    Yoast plugin says I can use custom fields as followed:

    %%cf_<custom-field-name>%% Replaced with a posts custom field value
    %%ct_<custom-tax-name>%% Replaced with a posts custom taxonomies, comma separated.
    %%ct_desc_<custom-tax-name>%% Replaced with a custom taxonomies description

    From what I know, the custom field for a city is “_VenueCity”. Is that correct?

    Unfortunately %%cf_VenueCity%% or %%cf__VenueCity%% doesn’t work.

    Do you know why? What am I doing wrong here?

    Thanks,
    Johannes

    #1390267
    Victor
    Keymaster

    Hi Johannes!

    Thanks for getting in touch with us. Let me try to help you with this topic.

    I’m not really sure how Yoast SEO plugin makes use of the custom fields or where you are actually adding them. Is that one of Yoast settings? Please let me know a bit more about this so I can further assist you.

    As for the _VenueCity custom field, please note that is not a custom field for the event post type, but instead a custom field for the tribe_venue post type. So, you would have to be calling that custom field from within the venue context.

    Does it help? Let me know about it.

    Best,
    Victor

    #1390407
    Johannes Maier
    Participant

    Hi Victor,

    I’m adding them in the SEO title settings (Yoast SEO -> Titles & Metas -> Post Types -> Venues).
    I added two screenshots of where I want to add it and a list of the variables from YoastSEO.

    The ideal would be that my Venue Meta Titles would look something like this:
    Venue Name » Venue City, Venue Country | Sitename

    Thank you very much for your help.

    -Johannes

    #1390694
    Victor
    Keymaster

    Hi Johannes!

    Thanks for coming back with that info.

    I made a few tests and I could make it work using the following in the title Venue template:

    %%title%% » %%cf__VenueCity%%, %%cf__VenueCountry%% %%sep%% %%sitename%%

    Bear in mind the Venue must have that information in order to be printed out. Try it out and let me know if it works for you.

    Best,
    Victor

    #1391278
    Johannes Maier
    Participant

    Dear Victor,

    I really appreciate your help. It works!

    I tried it just like that before, but since in the preview (see attached screenshot) it doesn’t show the city nor country, I thought it was not working. By looking at the title in the frontend, I saw that it is working.

    Thanks a lot,
    Johannes

    #1392296
    Victor
    Keymaster

    Hi Johannes!

    I’m happy to help! Thanks for letting me know it worked out for you.

    I’ll go ahead and close this thread, but feel free to open a new topic if anything comes up and we’d be happy to help 🙂

    Best,
    Victor

     

Viewing 6 posts - 1 through 6 (of 6 total)
  • The topic ‘Yoast SEO titles with custom fields from Events Calendar’ is closed to new replies.