Home › Forums › Calendar Products › Events Calendar PRO › Yoast SEO titles with custom fields from Events Calendar
- This topic has 6 replies, 2 voices, and was last updated 6 years, 4 months ago by Johannes Maier.
-
AuthorPosts
-
November 22, 2017 at 11:45 pm #1389758Johannes MaierParticipant
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 descriptionFrom 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,
JohannesNovember 23, 2017 at 1:42 pm #1390267VictorKeymasterHi 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,
VictorNovember 24, 2017 at 12:08 am #1390407Johannes MaierParticipantHi 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 | SitenameThank you very much for your help.
-Johannes
November 24, 2017 at 7:53 am #1390694VictorKeymasterHi 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,
VictorNovember 24, 2017 at 4:02 pm #1391278Johannes MaierParticipantDear 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,
JohannesNovember 27, 2017 at 5:21 am #1392296VictorKeymasterHi 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 -
AuthorPosts
- The topic ‘Yoast SEO titles with custom fields from Events Calendar’ is closed to new replies.