
On a Magento install, I utilize the Fishpig WordPress plugin to integrate WordPress into Magento for our blog pages. Great little plugin in my opinion.
The issue I ran into however, is that the breadcrumbs on the blog section are not correct – they start with Home / Home. The good news is that the URLs associated to these text links should be correct. For me, the first goes to the Magento site home page, the second to the blog home page. But I want to clarify the text that displays.
I am also using the Yoast SEO plugin within this WordPress install. I tracked this to be the root of the issue. The sad truth however, is that I can’t find any way to correct this in the WordPress Admin. That said, it is possible to fix this directly in the Database.
NOTE: If you are not familiar with or comfortable with working in the database, I highly advise you find someone who knows what they are doing here to help you out. It’s very easy to break your site in the Database if you aren’t careful.
Ok, my disclaimer said, time to jump into the database. ;) You need to find your WordPress tables within the database. When you setup a Fishpig install, you can use the same database as Magento or a separate database – so the exact location may carry for you. For me, I’m using a second database name wp_{site identifier here}.
Once in the WordPress database, find the wp_options table and search the option_name for wpseo_internallinks. Edit this record. The option_value field is the one of importance here. It should look like:
1 |
a:10:{s:20:"breadcrumbs-404crumb";s:25:"Error 404: Page not found";s:23:"breadcrumbs-blog-remove";b:0;s:20:"breadcrumbs-boldlast";b:0;s:25:"breadcrumbs-archiveprefix";s:12:"Archives for";s:18:"breadcrumbs-enable";b:0;s:16:"breadcrumbs-home";s:4:"Home";s:18:"breadcrumbs-prefix";s:0:"";s:24:"breadcrumbs-searchprefix";s:16:"You searched for";s:15:"breadcrumbs-sep";s:7:"»";s:23:"post_types-post-maintax";i:0;} |
You’ll see the word Home here about 1/2 way into the string – that’s the text that we want to change, which is the second instance of Home in the breadcrumbs. So change that to what you’d like it to say. In my case, I just changed it to Blog.
And now you’re ALMOST done. There’s one catch – this string of text is what is called a serialized array. What that means isn’t overly important, but what we do need to know is that you’ll see the s:4: just before the Home text we just changed. That 4 represents the number of characters in the word Home. So this needs to be corrected to reflect the number of characters of your new link title. In my case, I used blog and thus that is 4 characters and now change is needed. If you chose to use Blog Home you should change it to 9 – 4 characters per word plus a space. Makes sense, right?
Make sure that these changes have saved to the database and refresh your blog page – this change should now be all done.