Forum Replies Created

Viewing 5 replies - 1 through 5 (of 5 total)
  • For all those who cannot remove gallery tab using media_upload_tabs filter, mentioned above by totels:

    If you look into media.php file you will see that WordPress uses this filter after it is declared to add gallery tab to posts with attachments. So if you simply unset gallery tab it will be added anyway. To avoid this you should use $priority parameter when triggering the filter. The code should look like that:

    function remove_media_tab($tabs) {
    unset($tabs['gallery']);
    return $tabs;
    }
    add_filter('media_upload_tabs','remove_media_tab', 99);

    Nevertheless, if you want to stretch GMap window (e.g. for responsive layout) you can use .pgmm .canvas {width: 100%!important;}. Works well for me.

    Hello Jan

    You can put the first piece of code anywhere in your functions.php file, before the ending PHP tag (?>) – it should work just fine. Admin.css file should contain the CSS code – second part of code in my first reply, beginning with “#wpadminbar…”.

    Nevertheless, to get rid of those unstyled menus on your frontpage you should first disable WordPress Admin Bar Improved plugin – it probably has its own admin menu rendering system, which won’t be affected by my custom changes.

    Regards

    Marcin

    Hello Jan

    You are using WordPress Admin Bar Improved plugin but it seems that stylesheet and script files for that plugin are missing. If you use firebug or similar tool you will see that server response for these assets is 404 (Not found). That’s why your admin bar is broken. There’s probably something wrong with your WordPress configuration or simply those files are not there. Try to uninstall or reinstall the plugin.

    If you want to use my solution, disable plugin mentioned above and simply put first piece of code into your functions.php file. You will find it in wp-content/themes/the_world_is_listening_ote049/ folder or under Appearance -> Editor in your WP admin panel. Then you should add complementary stylesheet to your WP admin panel header. You should do this by writing a plugin, but if you’re not very familiar with this, take a shortcut and just put the code to your functions.php file:

    function my_admin_head() {
        echo '<link rel="stylesheet" type="text/css" href="' .get_stylesheet_directory_uri().'/admin.css">';
    }
    add_action('admin_head', 'my_admin_head');

    Then create the file admin.css, paste the CSS code into it and upload to the wp-content/themes/the_world_is_listening_ote049/ folder on your server.

    Hope it helps

    Marcin

    To remove WordPress 3.3 admin bar but left user and front end links intact (so restore the header to the 3.2 version) without plugin, you should put this into your functions.php or custom plugin:

    function remove_admin_bar_links() {
    	global $wp_admin_bar;
    	$wp_admin_bar->remove_menu('wp-logo');
    	$wp_admin_bar->remove_menu('view-site');
    	$wp_admin_bar->remove_menu('new-content');
    	$wp_admin_bar->remove_menu('comments');
    }
    add_action( 'wp_before_admin_bar_render', 'remove_admin_bar_links' );

    and add stylesheet with these lines to your admin_head:

    #wpadminbar {left:146px;background-color:#fff; background-image:none;z-index:9;border-bottom: 1px solid #ccc;
    -moz-box-shadow: 0px 2px 2px rgba(50, 50, 50, .1);
    -webkit-box-shadow: 0px 2px 2px rgba(50, 50, 50, .1);
    -box-shadow: 0px 2px 2px rgba(50, 50, 50, .1);}
    #wpadminbar .ab-top-secondary {margin-right:146px;background-color:#fff; background-image:none;}
    .folded #wpadminbar .ab-top-secondary {margin-right:32px;}
    body.admin-bar #adminmenu {padding-top:0px;}
    #wpadminbar * {text-shadow: none; color: #444;}
    #wpadminbar .ab-top-menu > li:hover > .ab-item, #wpadminbar .ab-top-menu > li.hover > .ab-item, #wpadminbar .ab-top-menu > li > .ab-item:focus, #wpadminbar.nojq .quicklinks .ab-top-menu > li > .ab-item:focus {background-color:#fff; background-image:none; color: #444; text-decoration: underline;}
    #wpadminbar .quicklinks .ab-top-secondary > li, #wpadminbar .quicklinks .ab-top-secondary > li a {border:0;}
    #wpadminbar .menupop .ab-sub-wrapper, #wpadminbar .shortlink-input {
    -moz-box-shadow: -2px 2px 2px rgba(50, 50, 50, .1);
    -webkit-box-shadow: -2px 2px 2px rgba(50, 50, 50, .1);
    -box-shadow: -2px 2px 2px rgba(50, 50, 50, .1);
    border-color: #ccc;}
    #wpadminbar .quicklinks a {padding: 0 15px;}

    Works like a charm for me.

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