Skip to:
Content
Pages
Categories
Search
Top
Bottom

Can’t change class name of BP menu elements


  • amedic
    Participant

    @amedic

    When I add a BP element (like profile, or messages) to menu I can’t change class name. That field is unable to edit, it is locked.
    How can I edit class name of BP menu element class=”bp-menu bp-profile-nav”?

    Thank you.

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

  • danbp
    Participant

    @danbp

    @amedic,
    Which menu are you talking about and where do you add that element ? In dashboard apparence > menu or with a custom function or else ?


    amedic
    Participant

    @amedic

    In dashboard apparence > menu you can add a class name, but on BP element that field is locked and I cannot change it.

    Once again TY for fast reply.


    danbp
    Participant

    @danbp

    This behave is intented so. Read in bp-core-admin-functions.php:799

     * If a person is editing a BP menu item, that person should not be able to
     * see or edit the following fields:
     *
     * - CSS Classes - We use the 'bp-menu' CSS class to determine if the
     *   menu item belongs to BP, so we cannot allow manipulation of this field to
     *   occur.
     * - URL - This field is automatically generated by BP on output, so this
     *   field is useless and can cause confusion.

    Why would you change the class name, as you can override any CSS rule within from your child-theme.


    amedic
    Participant

    @amedic

    I just want to style BP menu like my main menu.
    It would be the easiest way to add my main menu class name to BP element.


    amedic
    Participant

    @amedic

    Thank you for your help. JS needed to be turn off so that class name can be edited.

    Kind regards!

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Can’t change class name of BP menu elements’ is closed to new replies.
Skip to toolbar