Remove admin-bar WordPress 3.1

Posted: March 18th, 2011 | Author: | Filed under: Wordpress | Comments Off on Remove admin-bar WordPress 3.1

WordPress 3.1 is released and comes with many new features. One of them is the extra admin bar visible at the front-end of your website when user are logged in:

adminbar

Not everyone is happy with this new feature. Here is the way to disable it for project:

Open functions.php and add:

// Disable admin-bar from showing on your blog
wp_deregister_script('admin-bar');
wp_deregister_style('admin-bar');
remove_action('wp_footer','wp_admin_bar_render',1000);

WordPress: Add more than one sidebar

Posted: July 10th, 2009 | Author: | Filed under: Wordpress | 1 Comment »

In wordpress it is possible to create multiple ‘sidebars’ with widgets on custom places in your template. To register a new sidebar open functions.php in your template folder (or create one), add:

if ( function_exists('register_sidebar') )
    register_sidebar(array(
        'name' => 'SIDEBARNAME',
        'before_widget' => '',
        'after_widget' => '',
        'before_title' => '',
        'after_title' => '',
    ));

Explaination of the array() :

‘name’ = name of your new sidebar
‘before_widget’ = Add a html element before you start your widget (eg. <div class=”widget”)
‘after_widget’ = close the element you started above
‘before_title’ = Add a html element before your widget title (eg. <h3>)
‘after_title’ = close the element you started above

Now al you have to do is add your new sidebar to your place in your template, add:

<?php if ( !function_exists('dynamic_sidebar') || !dynamic_sidebar('SIDEBARNAME') ) : ?>

This is what shows when no widgets are added.

<?php endif; ?>

WordPress: text-align fix

Posted: July 10th, 2009 | Author: | Filed under: CSS, Wordpress | Comments Off on WordPress: text-align fix

I just finished my new template and I was ready to test how it looks, great! but…oops a problem showed up and I couldn’t find what was wrong. Read the rest of this entry »