Hierarchy title tags needed

#475229
  • Resolved treycopeland
    Rank Math free

    Hello,

    I have a custom post type with a custom taxonomy. For example, site.com/campgrounds/texas/dallas, but I can only get the title tag to say Campgrounds in Texas. How can I get the child category in the title tag as well?

    Thanks!

Viewing 5 replies - 1 through 5 (of 5 total)
  • Hello,

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

    Checking your current website, it seems to be mentioning “Dallas” already as you can see in my screenshot in the sensitive data section.

    Can you please confirm if you meant to change the Breadcrumbs title?

    Looking forward to helping you with this one.

    I need the HTML meta title to say “Dallas TX”, it currently only shows “Dallas”

    Hello,

    In this case, please include this variable %parent_title% in your meta title to display the title of the parent location.

    Let us know how that goes. Looking forward to helping you.

    When I do ‘Campgrounds in %parent_title% %term%’ it doesn’t show anything but the %term%.

    Please take another look. Thanks!

    Hello,

    In this case, the variable won’t work because it’s inside a taxonomy and that is only useful for posts and pages.

    In this case, you will need to create a custom variable with the following filter: https://rankmath.com/kb/filters-hooks-api-developer/#add-extra-variables

    You can use the same idea you are using on your taxonomy-locations.php file to retrieve the title with the parent location inside the callback function of the filter.

    Hope this helps solve your issues.

    Don’t hesitate to get in touch if you have any other questions.

    Hello,

    Since we did not hear back from you for 15 days, we are assuming that you found the solution. We are closing this support ticket.

    If you still need assistance or any other help, please feel free to open a new support ticket, and we will be more than happy to assist.

    Thank you.

Viewing 5 replies - 1 through 5 (of 5 total)

The ticket ‘Hierarchy title tags needed’ is closed to new replies.