Skip to:
Content
Pages
Categories
Search
Top
Bottom

Buddybar in header doesn't validate

  • @drummergirl

    Participant

    I moved the buddybar to the header of my site in order to fit the styling, but now it doesn’t validate. It shows fine on the major browsers, but the code it putting html elements in the <head> tag.

    I used this suggested code to change the position:

    remove_action(‘wp_footer’, ‘bp_core_admin_bar’, 8 );

    add_action(‘wp_head’, ‘bp_core_admin_bar’, 8 );

    If I remove those functions, it validates. Did I miss something?

    the site is http://girlscantwhat.com/

Viewing 2 replies - 1 through 2 (of 2 total)
  • @r-a-y

    Keymaster

    Don’t use the wp_head action.

    In your custom template’s header.php, add your own action right underneath [/head]:

    eg.

    do_action('custom_after_head');

    Then change:

    add_action('wp_head', 'bp_core_admin_bar', 8 );

    to

    add_action('custom_after_head', 'bp_core_admin_bar', 8 );

    @drummergirl

    Participant

    Thanks! I swear I tried that earlier and got errors, but that worked. You made my day. :D

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Buddybar in header doesn't validate’ is closed to new replies.
Skip to toolbar