Support Forum

How to Edit Page Tile in Breadcrumbs

1
jim
Here and Now
Member
Platinum Members
Apr 24, 2019 - 1:33 pm

We've been working to optimize SEO, and recently edited our Forums page title. I do want this longer title to appear at the top of the page, but I do not want it in the breadcrumbs which used to be formatted as:

Home > Forums > Topic Title > Post Title

They now appear as:

Home > Tripawds Three Legged Dog and Cat Forums > Topic Title > Post Title

Is there a way to edit the Breadcrumbs to just read Forums, while keeping the longer title in the Page Title?

I found the breadcrumbs in the spHead templates, but I see no way to hard-code in the desired Forums title. Nor do I see any option for assigning such in the Page and Permalink options.

So, to confirm: I want to show "Forums" in the Breadcrumbs, while keeping the Page Title at top as "Tripawds Three Legged Dog and Cat Forums".

Will this be possible? Our breadcrumbs get a little long with our recent page title edits.

spBreadcrumbs.pngImage Enlarger

forum-page.pngImage Enlarger

Simple Press
Admin
Apr 24, 2019 - 1:47 pm

Hi:

Unfortunately I don't think there's a way to do that without writing some code.  I think you would have to modify the core sp_BreadCrumbs() function.  The right way would be to modify that function to apply a filter around the page title when its referenced and commit that to the core plugin.  Then write a new function in either your theme or a separate plugin that uses that new filter to change the title as its being rendered by the the sp_BreadCrumbs() function.  This way, when the core plugin is updated, your changes aren't overwritten.

Thanks.

jim
Here and Now
Member
Platinum Members
Apr 24, 2019 - 3:23 pm

Simple Press said
I don't think there's a way to do that without writing some code.

I figured that might be the case, thanks for confirming.

I forget, is there a way to remove the Home link from the breadcrumbs?

Simple Press
Admin
Apr 26, 2019 - 12:11 pm

Oops - looks like we missed your question from a few days ago.  One of the params to the sp_BreadCrumbs function is the home label so you might try changing that.  Not sure which them your site is using but the call to that function will likely be in a file called spHead.php.

Hope this helps.

jim
Here and Now
Member
Platinum Members
Apr 26, 2019 - 12:28 pm

Simple Press said
looks like we missed your question from a few days ago...

Got it, thanks!

1