Skip to:
Content
Pages
Categories
Search
Top
Bottom

Buddypress breadcrumbs

  • Profile photo of murrayac
    murrayac
    Participant

    @jumpmuz

    I have add the code below to get the breadcrumbs working, is this correct

    <?php } elseif (bp_is_page()) { ?>
    <?php _e(bp_breadcrumbs_add( $name, $url, $desc, $parms, $img )) ?>

Viewing 5 replies - 1 through 5 (of 5 total)
  • Profile photo of murrayac
    murrayac
    Participant

    @jumpmuz

    Can I get an example of the below statment wrapped in php thanks

    bp_breadcrumbs_add( $name, $url, $desc, $parms, $img )

    Profile photo of 3sixty
    3sixty
    Participant

    @3sixty

    Wow, cool. I didn’t know this API existed. https://wordpress.org/extend/plugins/bp-breadcrumbs/

    I’m trying to figure it out now, but JJJ provided no documentation so far, unless it’s in the plugin file itself.

    I tried this but it didn’t do anything:

    bp_breadcrumbs_add('testcrumb', 'google.com');

    and

    echo bp_breadcrumbs_add('mycrumb', 'yahoo.com');

    maybe it has to be an internal url, like /activity.

    I’ll open the plugin file now.

    Profile photo of 3sixty
    3sixty
    Participant

    @3sixty

    maybe it has to be an internal url, like /activity.

    That turns out not to be the case:

    = Does this plugin check against existing slugs? =

    No. It takes whatever $url you give it. This makes it fairly flexible for any BuddyPress installation with any component.

    Profile photo of 3sixty
    3sixty
    Participant

    @3sixty

    ha HAAA breakthrough.

    I figured out this much. But is there any logic or autodiscovery to it? Or does it just create “dumb” objects that you have to push around by hand (such as, “if you are on the groups page, display breadcrumbs x, y, and z”). In the readme.txt, JJJ says automatic adding of breadcrumbs is planned, so maybe that is the “smart” phase of this.

    <style>
    .breadcrumb-wrapper { border: 0px solid red; padding:3px; height:25px; clear:both }
    .breadcrumb-list { border: 0px solid green; height:25px }
    .breadcrumb { float:left; margin:2px; border: 0px solid blue }
    </style>

    <?php
    /* put function bp_breadcrumbs_add( $name, $url, $desc, $parms, $img ) in places you want to add a breadcrumb */
    // global $breadcrumbs_template; var_dump($breadcrumbs_template);
    if (bp_has_breadcrumbs()) {
    bp_breadcrumbs_add('Members', '/members');
    bp_breadcrumbs_add('Groups', '/groups');
    bp_breadcrumb_display( ' > ' );
    }
    ?>

    Profile photo of Expana
    Expana
    Participant

    @expana

    Did anyone work out how to make breadcrumbs work properly?

    I tried the above, but
    – it adds “Members” or “Groups” after the current page link
    – it does not display the current page name, but its link instead..

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Buddypress breadcrumbs’ is closed to new replies.
Skip to toolbar