Last active
August 8, 2024 16:38
-
-
Save timstl/5348604 to your computer and use it in GitHub Desktop.
Remove "Home" link from Yoast WordPress SEO's breadcrumbs. Add to functions.php.
This is not working now, maybe they changed something. Any Idea on how to change the link? I'm on the blog, I don't need the Home, I want the forst link to be the Posts Archive page.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
It's been a while since I have used this, but I think instead of using array_shift you could do something like this:
if ($links[0]['url'] == get_home_url()) { $links[0]['url'] = 'https://someurlhere.com'; }
You would probably want to use get_permalink() or site_url() to generate the desired URL - not hardcode it - but I think that idea would work.