Support Forum

Reboot — adding group to breadcrumbs?

CB Christine Baker
Christine Baker
Member

Seen it before, but now I can’t find the instructions how to add the group to the breadcrumbs.  

And I’m wondering whether I can change the name displayed for the forum page to “Home” in the breadcrumbs too (without changing the page name because it looks good in the URL.)

Thanks for any pointers!

13 Answers

New Answer

MP Mr Papa
Mr Papa
Member

please look here:  https://simple-press.com/documentation/codex/api/template-functions-and-the-api/display-template-functions/common-view/sp_breadcrumbs/

you will find that in the spHeadDesktop.php template file… as always, you should use a child theme (or custom theme)…  just set groupLink=1 in the function arguments..

and for mobile, dont forget about:  https://simple-press.com/documentation/codex/api/template-functions-and-the-api/display-template-functions/common-view/sp_breadcrumbsmobile/

CB Christine Baker
Christine Baker
Member

breadcrumbs.JPGSo I just installed a child theme, finally.   Now I have no idea what to do.

At the top of the page is says:

FAQ / Mohave.  Not clickable. Where does that come from and why is it there?  Note that it’s REVERSED from the breadcrumbs.

I want to change two things in the breadcrumbs:

1) Mohave needs to be changed to Home.

2) I need to add the groups.

Looking at https://simple-press.com/documentation/codex/api/template-functions-and-the-api/display-template-functions/common-view/sp_breadcrumbs/

So, I do this?

‘homeText’: HOME

‘groupLink’ => 1

But I have NO idea what to do with that.  This does NOTHING:

sp_BreadCrumbs(‘tagClass=spLeft homeText: HOME, groupLink => 1 spBreadCrumbs&tree=0&icon=&homeIcon=sp_CrumbsHome.png&truncate=35’, __sp(‘Home’)) ;

I added commas, deleted commas and now my eyes are about to fall out.  Are there some examples somewhere or any directions on what to actually do?

As always, much appreciate pointers!

YS Yellow Swordfish
Yellow Swordfish
Member

Christine Baker said

So I just installed a child theme, finally.   Now I have no idea what to do.

At the top of the page is says:

FAQ / Mohave.  Not clickable. Where does that come from and why is it there?  Note that it’s REVERSED from the breadcrumbs.

That just looks like the page title to me which, incidentally, is NOT displayed by the Simple:Press theme templates but by your WordPress theme.

This can be changed by the SP options under Components > SEO. Or it can be totally removed in Options > General Display Settings. However, it must be stressed that some WordPress themes also try and manipulate the page title in some way which can mess with the SP settings or override them completely.

I want to change two things in the breadcrumbs:

1) Mohave needs to be changed to Home.
2) I need to add the groups.

Looking at https://simple-press.com/documentation/codex/api/template-functions-and-the-api/display-template-functions/common-view/sp_breadcrumbs/

So, I do this?

‘homeText’: HOME

‘groupLink’ => 1

But I have NO idea what to do with that.  This does NOTHING:

sp_BreadCrumbs(‘tagClass=spLeft homeText: HOME, groupLink => 1 spBreadCrumbs&tree=0&icon=&homeIcon=sp_CrumbsHome.png&truncate=35’, __sp(‘Home’)) ;

I added commas, deleted commas and now my eyes are about to fall out.  Are there some examples somewhere or any directions on what to actually do?  

These template display functions use the same format and rules as WordPress display functions to pass their parameters. Each parameter is separated by an ampersand and each parameter has a pre-defined name and value separated by an equals sign. You can quite clearly see this by all the parameters that were already shown in the function above. 

So – what you probably want is:

sp_BreadCrumbs('tagClass=spLeft spBreadCrumbs&tree=0&icon=&homeIcon=sp_CrumbsHome.png&truncate=35&homeText=HOME&groupLink=1', __sp('Home'));

To be honest – the best example is already there and you just need to use the same format.

CB Christine Baker
Christine Baker
Member

Thanks!  The groups are now in my breadcrumbs, but the text didn’t change.    Is ‘homeText’: HOME not the text where it says “Mohave” now?  How do I change that?

YS Yellow Swordfish
Yellow Swordfish
Member

What, exactly, does ‘Mohave’ refer to.

CB Christine Baker
Christine Baker
Member

I couldn’t make a page named “forum” because I already have one, so I made it Mohave.   I suppose I can change the page name too.  That worked! 

Thanks for your help, you have no idea how hard this is when you’ve never worked with functions etc.

MP Mr Papa
Mr Papa
Member

No worries! Glad we could help and that it’s now where you want it. 

CB Christine Baker
Christine Baker
Member

A little update on the page title, the FAQ | Mohave.   I checked my theme and then other install and there’s no title.  Finally found the SP OPTION to NOT display the title.   And it works perfectly in my other install, but does NOTHING on this one.  Same theme, server, everything.   Finally just edited it out in the theme, so it’s all good.

But I sure don’t get why that option to hide the title didn’t work.    Just an FYI in case someone else has that problem, I’m good now.

YS Yellow Swordfish
Yellow Swordfish
Member

Did you clear your browser cache before seeing it it worked? If you re-loaded the same page as a test then it is possible that the page was rendered from the browser cache.

CB Christine Baker
Christine Baker
Member

I did, but at my other site it also worked even without clearing the cache.   Just thought it was very odd, the only difference in the 2 installs is that where it didn’t work it’s in a subdomain.

CB Christine Baker
Christine Baker
Member

Jetpack is on the one that doesn’t work.

YS Yellow Swordfish
Yellow Swordfish
Member

I certainly wouldn’t dismiss JetPack as the culprit. It can cause absolute mayhem and is not particularly plugin friendly. It is quite possible that its is overriding the SP filter that removes the page title.