Tagged: breadcrumb trail
I added breadcrumbs to my Buddypress pages using a script you provided, but this gives an error when trying to create new groups:
Fatal error: Call to a member function get_secondary() on null in /home/mydomain/wp-content/plugins/bp-custom.php on line 245.This is my bp-custom.php: https://www.dropbox.com/s/u5kzu3fj3dbkyz0/bp-custom.php?dl=0
Please help me fix this. Thank you!
Hi Hugo,
I am sorry, I haven’t seen this error before. You may put change this line$nav_items = buddypress()->groups->nav->get_secondary( array( 'parent_slug' => $group_slug ) );
to
$nav_items = isset( buddypress()->groups->nav ) ? buddypress()->groups->nav->get_secondary( array( 'parent_slug' => $group_slug ) ) : array();
Please let me know if it works or not?
Regards
Brajesh
Viewing 2 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic.
This topic is: not resolved