Snippet

This topic contains 4 replies, has 3 voices, and was last updated by  Stiofan O’Connor 8 years, 6 months ago.

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

Open Support Ticket
  • Author
    Posts
  • #286602

    Mark Kingsley-Monks
    Full Member
    Post count: 163

    Hi

    I’ve installed Yoast SEO Premium and have the ability to change how the information appears when I post to Facebook or Twitter. At the moment it’s set to show the title of the page, a separator and the site name.

    Halloween Trail | A Little Bit About (these are the variables %%title%%%%page%%%%sep%%%%sitename%%)

    I want it to show the title of the page, separator and town.

    Halloween Trail | East Grinstead (I’m assuming it will look something like this %%title%%%%page%%%%sep%%%%cf_<custom-field-name>%%

    Can you please tell me which page I need to change the meta data on and what the <custom-field-name> is called for the Town field.

    Cheers

    Mark

    #287193

    Paolo
    Site Admin
    Post count: 31211

    hi,

    Can you please tell me which page I need to change the meta data on

    This looks like a question for Yoast support. Honestly I have no idea.

    what the is called for the Town field.

    the city field is not a regular custom field. I don’t think this is feasible at all.

    I asked to Stiofan to double check and let us know,

    Thanks

    #287261

    Mark Kingsley-Monks
    Full Member
    Post count: 163

    Hi Paolo,

    Can you please tell me which page I need to change the meta data on

    Is the page that the listing is made from one of these (see screenshot)?

    what the custom field is called for the Town field.

    I look forward to Stefan’s reply.

    Cheers

    Mark

    #287273

    Paolo
    Site Admin
    Post count: 31211

    Hi,

    it’s a template, not a single page. The setting should be in yoast and should be similar to the setting used to change meta title of posts.

    As I said, you should ask for support to Yoast staff for this. It’s a Yoast setting, not a GeoDirectory setting.

    Thanks

    #287726

    Stiofan O’Connor
    Site Admin
    Post count: 22956

    Hi Mark,

    If you can ask if there is a filter for this or any docs to be able to change the output i can give you a snippet.

    FYI you would get the city name like this:

    $city_name = geodir_get_post_meta($post->ID, 'post_city', true);

    Thanks,

    Stiofan

Viewing 5 posts - 1 through 5 (of 5 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