Skip to:
Content
Pages
Categories
Search
Top
Bottom

Help: bp-custom.php


  • Shnooka30
    Participant

    @shnooka30

    I’m trying to hide buddypress widgets and never created a bp-custom.php file before.

    Is this correct? I keep getting a white screen when i upload (bp-custom.php) into my plug-ins directory.

    <?php
    //CUSTOM CODE FOR BUDDYPRESS
    // Remove buddypress widgets from blogs other than the main blog
    function hide_bp_widgets() {
    if (!is_main_blog()) remove_all_actions(‘bp_register_widgets’);
    }
    add_action(‘plugins_loaded’, ‘hide_bp_widgets’, 1); // Has to run before bp_setup_widgets()
    ?>

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

  • Shnooka30
    Participant

    @shnooka30

    //CUSTOM CODE FOR BUDDYPRESS
    // Remove buddypress widgets from blogs other than the main blog
    function hide_bp_widgets() {
    if (!is_main_blog()) remove_all_actions(‘bp_register_widgets’);
    }
    add_action(‘plugins_loaded’, ‘hide_bp_widgets’, 1); // Has to run before bp_setup_widgets()

    testing that really quick…
    Fatal error: Call to undefined function is_main_blog() in D:xampplitehtdocsbuddypresswp-contentpluginsbp-custom.php on line 4

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Help: bp-custom.php’ is closed to new replies.
Skip to toolbar