• Resolved tahaalikhan

    (@tahaalikhan)


    Hello,
    I am using Mylisting theme and I’m facing some problems in setting up the SEO title for listings. I want a title to be as followed:
    Business Name – Category Located In City Province, Country
    I have been able to get the title as followed:
    Business Name – Category Located In City, Country
    The issue is that the Province is the custom field and when I am using %customfield(field-name)% it doesn’t make any effect as it’s not showing the province value.
    Any help would be really appreciated.

Viewing 1 replies (of 1 total)
  • Plugin Author Rank Math SEO

    (@rankmath)

    Hello @tahaalikhan,

    Thank you for contacting the support and sorry for any inconvenience that might have been caused due to that.

    If the value is store in the postmeta table then the %customfield% variable should work.

    To check if the value is stored in the postmeta table, you can try adding get_post_meta( $post_id, 'field_name', true ); and see if it outputs any data.

    If it doesn’t then that means the value is stored somewhere else. The value should also be in the string format. If it is stored in searialized or array format then the %customfield% variable will not output it.

    In that case, you can register a new variable using this filter:
    https://rankmath.com/kb/filters-hooks-api-developer/#add-extra-variables

    Hope that helps.

Viewing 1 replies (of 1 total)

The topic ‘Mylisting Custom Field’ is closed to new replies.