0
votes

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

    1 Answers

    0
    votes
    $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