question regarding bp_nav for classifieds

Hi, thank you for your products and services; they are very helpful.

I was trying to disable the classifieds link in my bp_nav but I have been unable to find the appropriate name for it. I’ve tried using “classifieds” and some others but to no avail. Is there any documentation where I’d be able to find the appropriate name for these plugins to keep my bp_nav area organized?

Thanks again,

Christian

  • renaissanceinstitute
    • Design Lord, Child of Thor

    Thank you! I installed that plugin and I’m looking forward to putting it to use.

    I found that the following worked when added to my bp-custom.php file:

    function my_bp_classifieds_menu() {
    global $bp;

    $bp->bp_nav['classifieds']= false;
    }
    add_action('wp', 'my_bp_classifieds_menu');

  • Timothy
    • Chief Pigeon

    Just wanted to add here that the other option is to remove the original hook that we make within the Classifieds plugin. It’s that hook which starts the code going.

    add_action( 'init', 'remove_classified_nav');
    function remove_classified_nav() {
    global $Classifieds_Core;
    remove_action('wp', array( $Classifieds_Core, 'add_navigation' ), 2);
    }

    This way you not only remove the menu item, you ensure none of the code is run for the features this uses.

    Take care.

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.