0

I developed a custom theme and register_sidebar in function.php to show menus on sidebar using Custom Menu (widget). Then create a menu through Appearance-> Menu and set it in Widget's Sidebar area by using Custom Menu Now I need to add an extra link for login page. This link

  • should use extra class , which all other links/menu aren't using. I added extra link through Appearance-> Menu but please help me to know how can I add a class for only that extra link (login)
  • 1 Answers1

    0
    $args = array(
        'name'          => __( 'Sidebar name', 'theme_text_domain' ),
        'id'            => 'unique-sidebar-id',
        'description'   => '', 
            'class'         => 'PUT YOUR CLASS HERE', <=== here you can mention your class
        'before_widget' => '<li id="%1$s" class="widget %2$s">',
        'after_widget'  => '</li>',
        'before_title'  => '<h2 class="widgettitle">',
        'after_title'   => '</h2>' ); ?>
    register_sidebar( $args ); 
    

    Register sidebar Refer here

    Prince Singh
    • 5,023
    • 5
    • 28
    • 32
    • Thanks for reply but this class will impact on whole menu items not the specific one , as I mentioned. I only want to use specific class for the last one link/item. – user2842302 Oct 03 '13 at 11:35