Group Hierarchy Breadcrumbs
I love using group hierarchy in buddypress. it should be included in the BP build !
Is it possible to get a php function to call a breadcrumbs feature?
So the output would be group title links like the following:
[Main Group] > > >
Each group is a clickable link. It obviously would show the CURRENT group and parent groups that the user has navigated to.
Good idea bad idea?
You can use the `bp_group_hierarchy_breadcrumbs()` function to display this.
The documentation incorrectly says that this function RETURNS this text, when in fact it ECHOES it.
I tried to throw the following in my header:
It caused the white screen of death.
This is when I was in the root of my site (not a group).
Forgive my poor coding skills but is there a way to display the breadcrumb even if it is at the home path?
And, get the original request working ?
to my single/group-header.php file and it works fine.
The problem is styling it. I added the following to bp-group-hierarchy-template.php at line 171:
Original: `echo bp_group_hierarchy_get_breadcrumbs();`
New: `echo ‘‘.bp_group_hierarchy_get_breadcrumbs().’
And then added the pbgh_breadcrumbs class to my style sheet. It worked well. Might I suggest a similar revision for the next update?
@johnnymestizo – can you provide an example of the “rubbish link” that is being generated? That would be helpful in troubleshooting.
I got breadcrumbs working in single/group-header.php
However, I would like to call it from my header.php or functions.php file.
As, I want to insert breadcrumbs in the top menu bar of my site.
Is this function only support in the group loop?
Never mind, i have ripped my wp menu apart and placed the bp_group_hierarchy_get_breadcrumbs() as a menu to replace it, when bp_is_group() is true
I have made this group in my header bar.
Please go to http://tradr.com/groups/ and see it not work correctly.
@3dperuna your solution worked well for me. Thank you kindly. The only difference I made is to include the wrapping `div` in my child theme’s single/group-header.php rather than mess with the plugin code itself (in bp-group-hierarchy-template.php). We already need to add the `php echo` into the child theme file so I thought we might as well slot the wrapping `div` there too.
It probably is better still to use child-theme/functions.php and lever off the `bp_before_group_header_meta` action hook but this will do for now.
I was originally looking for a parent group widget but this is better as it makes sense to see the complete hierarchy line of parent groups. Nice work.
Any idea why it doesn’t work for me?
I am keen to run this still…
Can you check out my page and see the source code output?
Any idea why this does not work?
I’ve posted a short write-up on adding breadcrumbs to your group pages. It’s pretty straightforward – as you all have already discovered, there’s no way around a child theme. But there still seems to be a lot of confusion, so I hoped this would straighten things out.
This works awesome now! Thanks David.
Still trying to get all the breadcrumb separators to be
Please see here to see my issue:
You guide says this should work but I couldnt get it working.
‘bp_group_hierarchy_get_breadcrumbs( $separator = ‘|’, $group = false )’
- The topic ‘Group Hierarchy Breadcrumbs’ is closed to new replies.