Skip to:
Content
Pages
Categories
Search
Top
Bottom

disabling breadcrumbs


  • binarymoon
    Participant

    @binarymoon

    Anyone know a simple way to disable the breadcrumbs? My theme has it’s own breadcrumb system that seems to work better than the bbpress one so I would like to stop the built in one from showing, perhaps by overriding the breadcrumb template file?

Viewing 20 replies - 1 through 20 (of 20 total)

  • Anointed
    Moderator

    @anointed

    There is no ‘easy’ way to remove the breadcrumbs as they are included in a number of templates. You would need to go through each of the bbPress templates and remove the following:

    <?php bbp_breadcrumb(); ?>


    binarymoon
    Participant

    @binarymoon

    I had a feeling you would say that. I was hoping there was a way of overriding the function/ some include file somewhere. Oh well – thanks for clarifying :)


    Anointed
    Moderator

    @anointed

    Not that I am aware of.

    I built my own custom template and simply moved all the calls to the breadcrumbs to my own single file which I include in my theme. This means edit only one place and I am golden. Took a bit of work though.

    I’m guessing if there is some way of overriding the breadcrumbs programmaticly that JJ will chime in someday, I simply don’t know.


    John James Jacoby
    Keymaster

    @johnjamesjacoby

    There is. $1 to the person that looks for the function and finds out how. :)


    binarymoon
    Participant

    @binarymoon

    easier than I imagined.

    function bm_bbp_no_breadcrumb ($param) {
    return true;
    }

    add_filter ('bbp_no_breadcrumb', 'bm_bbp_no_breadcrumb');

    How would you like to send me my dollar? :)

    Now if only I could work out why this isn’t working properly – http://bbpress.org/forums/topic/remove-default-template-styles?


    amirsaam
    Member

    @7i7griffin

    I like that smile :))


    John James Jacoby
    Keymaster

    @johnjamesjacoby

    @binarymoon – nicely done! PayPal okay? :)

    I didn’t find any bm_bbp_no_breadcrumb in functions file :(


    binarymoon
    Participant

    @binarymoon

    I created that function. You need to add it to your themes functions.php file


    shell20110309
    Member

    @shell20110309

    i do not think there is a way to remove the breadcrumbs

    thanks binarymoon worked perfectly

    Thanks, binarymoon! That is exactly what I needed.


    kristinachilds
    Participant

    @kristinachilds

    I’ve removed all the breadcrumb calls in every template file but they still show up. I can’t use the filter because I have the call in header.php. Any idea why this isn’t working? For now I just solved it with CSS, but would like to know where the hook is.

    #bbpress-forums .bbp-breadcrumb-home, 
    # bbpress-forums .bbp-breadcrumb-root,
    # bbpress-forums .bbp-breadcrumb-separator,
    # bbpress-forums .bbp-breadcrumb-current { display: none; }
    

    kristinachilds
    Participant

    @kristinachilds

    argh! the code posting on this forum is so jinky…


    dennysvm
    Participant

    @dennysvm

    thanks a lot binarymoon!!!


    fiero_alleaten
    Participant

    @fiero_alleaten

    When I add the function to functions.php I get a php error :( Does it work with bbpress 2.2.2?


    fiero_alleaten
    Participant

    @fiero_alleaten

    No, it works. My fault. I messed up with child functions


    mdroca
    Participant

    @mdroca

    function bm_bbp_no_breadcrumb ($param) {

    return true;

    }

    add_filter (‘bbp_no_breadcrumb’, ‘bm_bbp_no_breadcrumb’);

    Could any tell me how do I need to use this code? Thank You!


    philipjohn
    Participant

    @philipjohn

    @mdroca You should paste that code into your theme’s functions.php file. Here’s a guide on how to do that safely: http://wp-events-plugin.com/tutorials/how-to-safely-add-php-code-to-wordpress/

    Also, for others wanting to hide bbPress breadcrumbs, this code is a bit more compact but does the same job:
    add_filter('bbp_no_breadcrumb', function($arg) { return true; } );


    AntonyC
    Participant

    @antonyc

    Is it possible to substitute the forum root part of the breadcrumb with a url of my choice?
    Cheers,
    Antony

Viewing 20 replies - 1 through 20 (of 20 total)

You must be logged in to reply to this topic.