How to hide that you are using WordPress aka debranding WordPress

WordPress logo I like WordPress, really I do. I use it whenever possible to make my products path to my clients short and enjoyable. There's just one thing that pokes me in the eye whenever I need to deliver my project. WordPress developers have created greatest CMS ever conceived. They did that free of charge and the community is very grateful for all they've done, but do they really need to stick WordPress name and logo everywhere? Actually I already tried to remedy this situation inside one of my earlier articles. In this article I'll show you a few more tricks to remove some of WordPress branding from WordPress user interface.

The following snippets of code can be placed at the end of your themes functions.php file. At the end of this article you will find download link to little WordPress plugin that does all steps from this article.

Remove WordPress logo and menu from admin bar

I've already wrote about this one inside one of my older articles, I'm placing it her just for the sake of completeness.

1
2
3
4
5
6
7
8
<?php
/* Remove WordPress logo and menu from admin bar */
function wp_debranding_remove_wp_logo() {
    global $wp_admin_bar;
    $wp_admin_bar->remove_menu('wp-logo');
}
add_action( 'wp_before_admin_bar_render', 'wp_debranding_remove_wp_logo');
?>

Change WordPress login page logo image

By default WordPress login page has WordPress logo at the top. Here's how to replace that logo with your own:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
<?php
/* Change WordPress login page logo image */
function wp_debranding_change_login_page_logo() {
    ?>
    <style type="text/css">
        .login h1 a{
            background-image: url('http://upload.wikimedia.org/wikipedia/commons/thumb/8/8e/Tux-G2.svg/200px-Tux-G2.svg.png');
            background-size: auto;
            margin: 0 auto;
 
            /* Set to your image dimensions */
            height: 219px;
            width: 200px;
        }
    </style>
    <?php
}
add_action('login_head', 'wp_debranding_change_login_page_logo');
?>

Change WordPress login page logo link href attribute

By default WordPress login page logo takes you to WordPress.org. To change this to link to point to your current site link you can use following code:

1
2
3
4
5
6
7
<?php
/* Change WordPress login page logo link href attribute */
function wp_debranding_change_login_page_url($login_header_url) {
    return get_bloginfo( 'url' );
}
add_filter( 'login_headerurl', 'wp_debranding_change_login_page_url' );
?>

Change WordPress login page logo link title attribute

By default WordPress login page logo link has "Powered by WordPress" title attribute. Change this into current site tagline like this:

1
2
3
4
5
6
7
<?php
/* Change WordPress login page logo link title attribute */
function wp_debranding_change_login_page_title($login_header_title) {
    return get_bloginfo('description');
}
add_filter( 'login_headertitle', 'wp_debranding_change_login_page_title' );
?>

Remove WordPress name from adming interface footer

1
2
3
4
5
6
7
<?php
/* Remove WordPress name from adming interface footer */
function change_admin_footer_text() {
    return '';
}
add_filter('admin_footer_text', 'change_admin_footer_text');
?>

Remove content generator meta tag from page source

1
2
3
4
<?php
/* Remove content generator meta tag from page source */
remove_action('wp_head', 'wp_generator');
?>

Replace default Meta widget with custom widget without WordPress.org link

By default your meta widget besides links to login, register or fetch RSS feed has link to WordPress home page. Following code replaces that with exact same widget but without WordPress link:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
<?php
class WP_Debranding_Widget_Meta extends WP_Widget {
    function __construct() {
        $widget_ops = array('classname' => 'widget_meta', 'description' => __( "Log in/out, admin, feed and WordPress links") );
        parent::__construct('meta', __('Meta'), $widget_ops);
    }
 
    function widget( $args, $instance ) {
        extract($args);
        $title = apply_filters('widget_title', empty($instance['title']) ? __('Meta') : $instance['title'], $instance, $this->id_base);
 
        echo $before_widget;
        if ( $title )
            echo $before_title . $title . $after_title;
        ?>
            <ul>
            <?php wp_register(); ?>
            <li><?php wp_loginout(); ?></li>
            <li><a href="<?php bloginfo('rss2_url'); ?>" title="<?php echo esc_attr(__('Syndicate this site using RSS 2.0')); ?>"><?php _e('Entries <abbr title="Really Simple Syndication">RSS</abbr>'); ?></a></li>
            <li><a href="<?php bloginfo('comments_rss2_url'); ?>" title="<?php echo esc_attr(__('The latest comments to all posts in RSS')); ?>"><?php _e('Comments <abbr title="Really Simple Syndication">RSS</abbr>'); ?></a></li>
            <?php wp_meta(); ?>
            </ul>
        <?php
        echo $after_widget;
    }
 
    function update( $new_instance, $old_instance ) {
        $instance = $old_instance;
        $instance['title'] = strip_tags($new_instance['title']);
 
        return $instance;
    }
 
    function form( $instance ) {
        $instance = wp_parse_args( (array) $instance, array( 'title' => '' ) );
        $title = strip_tags($instance['title']);
        ?>
            <p><label for="<?php echo $this->get_field_id('title'); ?>"><?php _e('Title:'); ?></label> <input class="widefat" id="<?php echo $this->get_field_id('title'); ?>" name="<?php echo $this->get_field_name('title'); ?>" type="text" value="<?php echo esc_attr($title); ?>" /></p>
        <?php
    }
}
 
/* Replace default Meta widget with custom widget without WordPress.org link */
function wp_debranding_load_widgets(){
    unregister_widget('WP_Widget_Meta');
    register_widget('WP_Debranding_Widget_Meta');
}
add_action('widgets_init', 'wp_debranding_load_widgets');
?>

Remove WordPress related admin dashboard widgets

By default admin dashboard is stuffed with WordPress related widgets like WordPress Blog, WordPress News and WordPress Plugins. Lets remove those:

1
2
3
4
5
6
7
8
9
<?php
/* Remove WordPress related admin dashboard widgets */
function wp_debranding_remove_dashboard_widgets(){
    remove_meta_box('dashboard_primary', 'dashboard', 'normal');   // wordpress blog
    remove_meta_box('dashboard_secondary', 'dashboard', 'normal');   // other wordpress news
    remove_meta_box('dashboard_plugins', 'dashboard', 'normal');   // plugins
}
add_action('admin_menu', 'wp_debranding_remove_dashboard_widgets');
?>

Hide WordPress help menus and pointers pop-up dialogs

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
<?php
/* Hide help menus and .wp-pointers pop-up dialogs that inform about
 * new features after WordPress upgrade */
function wp_debranding_admin_css_hide(){
    ?>
    <style type="text/css">
        #contextual-help-link-wrap,
        .wp-pointer{
            display: none !important;
        }
    </style>
    <?php
 
}
add_action('admin_print_styles', 'wp_debranding_admin_css_hide');
?>

WP Debranding WordPress plugin download

Here you can download WordPress plugin package that, when activated, does all the steps from this article.

DOWNLOAD WP Debranding 1.00
DevGenii

E-commerce is a breeze with Magento Certified Developer Plus & Zend Certified PHP Engineer nearby. Get in touch!

12 thoughts on “How to hide that you are using WordPress aka debranding WordPress

  1. Dave

    Can you include this in the wp plugin directory? I have been looking for something that does exactly these. I think a lot of people out there are looking for this.

    Reply
    1. Marko Author

      Hi Dave,
      I can submit this to wp plugin directory but I think WordPress guys would reject it because they like their branding and repository is theirs so they decide. It is a nice idea and I will submit and keep you posted, thanks.

      Reply
  2. Barth Gimbal

    Very nice – worked well fro me. Thank you for compiling it into a plug-in!
    Like you, I’m appreciative for what WP folks have done and don’t mind giveing them props in unobtrusive ways, but the whole WP dashboard sure is confusing for noobs who visit the site.

    Reply
  3. Edwin

    Nice, and thanks for this — works as described. Might you know of any plugin or method to rewrite names of wordpress default files/folders? That is, change the names of folders from say ‘wp-content’ to ‘content’ or ‘wp-admin’ to ‘admin’ or ‘wp-includes’ to ‘includes’ hence also rewriting urls to remove the wp trace? Hope this is clear…

    Reply
    1. Marko Author

      I’m not aware of any plugin for that purpose. You should be able to achieve most of this by placing your own mod_rewrite rules into WordPress .htaccess file but this is somewhat hard to do if you haven’t done it before. If any plugin exists it works the same way.

      Reply
  4. Edwin

    Also, in addition to what you have in this plugin, is it possible to remove the version number in the bottom-right of the admin page and the ‘You are using WordPress 3.4.2’ for any other user except the admin? Otherwise, great work. Cheers.

    Reply
    1. Marko Author

      Here it is:

      <?php
      /* Remove WordPress version from adming interface footer */
      function change_admin_footer_version() {
          return '';
      }
      add_filter('update_footer', 'change_admin_footer_version');
      ?>
      Reply
  5. Upominki reklamowe

    Hi! This is my first visit to your blog! We are a collection of volunteers
    and starting a new project in a community in the same niche.
    Your blog provided us useful information to work on.
    You have done a extraordinary job!

    Reply
  6. vsync

    Hi Marko,

    1. Could you let me know how to edit the
    >Change WordPress login page logo link href attribute
    AND >Change WordPress login page logo link title attribute
    to one of an external site? example: http://www.google.com/, description “Overlord”

    2. On the login page, there is a link call “Back to…”
    I want to change it to an external website. example: http://www.google.com/

    Thank you!

     

    Reply

Leave a Reply

Your email address will not be published. Required fields are marked *