Buddypress List Element Class Error

When using this plugin with buddypress, the menu item showing up in the members profile has a class of "classifieds/my-classifieds/-personal-li" instead of "classifieds-personal-li"

  • Aicee Taguilaso
    • WordPress Warrior

    Hi @brettlewis!

    Thanks for the screenshot! I can confirm this issue on my own site. I'll flag this as a bug for the developer to have a look at. Either me or the developer will respond here for updates.

    Thanks for bringing this to our attention. :slight_smile:

    Cheers,
    Aicee

    • brettlewis
      • Site Builder, Child of Zeus

      This also appears to effect the functionality of bp_setup_nav. The menu item cannot be unset or renamed. I'm not 100% sure how those functions work, but I thought i'd add this just in case that is a separate issue that needs fixing.

      Example:

      function profile_menu_tabs(){
          global $bp;
          $bp->bp_nav['classifieds']['name'] = "Marketplace";
          unset($bp->bp_nav['classifieds']);
      }
      add_action('bp_setup_nav', 'profile_menu_tabs', 201);

      Obviously you wouldn't use both of those functions at once, I just put them both there as an example. Neither of those effects nav setup however.

  • Ash
    • WordPress Hacker

    Hello @brettlewis

    Please go to /wp-content/plugins/classifieds/core/buddypress.php line no 99 to 105:

    bp_core_new_nav_item(array(
                    'name' => __($nav_title, $this->text_domain),
                    'slug' => $bp->classifieds->slug . '/' . $default_sub_slug . '/',
                    'position' => 100,
                    'show_for_displayed_user' => true,
                    'screen_function' => array(&$this, 'load_template'),
                ));

    with

    bp_core_new_nav_item(array(
                    'name' => __($nav_title, $this->text_domain),
                    'slug' => $bp->classifieds->slug . '/' . $default_sub_slug . '/',
                    'position' => 100,
                    'show_for_displayed_user' => true,
                    'screen_function' => array(&$this, 'load_template'),
                    'item_css_id' => $bp->classifieds->slug
                ));

    This fix will be included in next update.

    Cheers
    Ash

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.