Exclude pages from wordpress menu

You can do it in two ways:

1).

$defaults = array('sort_column' => 'menu_order, post_title', 'menu_class' => 'menu', 'echo' => true, 'link_before' => '', 'link_after' => '','exclude'=>'11,12');
 $args = wp_parse_args( $args, $defaults );
 $args = apply_filters( 'wp_page_menu_args', $args );

 

2). <?php wp_list_pages('exclude=11,12' ); ?>

 

wordpress password protected

Add this to your themes functions.php page for deleting cookie of the password .

add_action( 'wp', 'post_pw_sess_expire' );
    function post_pw_sess_expire() {
    if ( isset( $_COOKIE['wp-postpass_' . COOKIEHASH] ) )
    // Setting a time of 0 in setcookie() forces the cookie to expire with the session
    setcookie('wp-postpass_' . COOKIEHASH, '', 0, COOKIEPATH);
}

remove textwidget div in wordpress

You can remove it by going to wp-includes/default-widgets.php

on line nr 502 in latest wp .

<div class="textwidget"><?php echo !empty( $instance['filter'] ) ? wpautop( $text ) : $text; ?></div>
 

just remove  the div from here.

But is it not a good idea to do change the core file of a WordPress.

You can change the class name using jquery also with the following jquery code:

jQuery('.textwidget').attr('class', 'newclassname');

Add new menu in Admin nav bar of wp admin dashboard

you can do it by addign the below code in themes functions.php

function my_admin_bar_menu() {
    global $wp_admin_bar;
    if ( !is_super_admin() || !is_admin_bar_showing() )
        return;
    $wp_admin_bar->add_menu( array(
    'id' => 'custom_menu',
    'class' => 'classname',
    'title' => __( 'menu name'),
    'href' => 'http://yoursiteurl.com/wp-admin/options-general.php?page=wpsupercache&tab=contents' ) );
}
add_action('admin_bar_menu', 'my_admin_bar_menu',100);

Remove container form wp menu

remove div element:

'container' => false

 remove ul elemnt

'items_wrap' => '%3$s'

remove li element

<?php echo strip_tags(wp_nav_menu(array('menu' => 'topmenu','container' => false, 'items_wrap' => '%3$s','echo' => false)),'<a>');  ?>