Change page title in admin area

add_filter(‘admin_title’, ‘my_admin_title’, 10, 2); function my_admin_title($admin_title, $title) { return get_bloginfo(‘name’).’ • ‘.$title; } You could also do a str_replace on $admin_title to remove “— WordPress” and change “‹”. Look at the top of the wp-admin/admin-header.php file to see what is going on by default.

Adding fields to the “Add New User” screen in the dashboard

user_new_form is the hook that can do the magic here. function custom_user_profile_fields($user){ ?> <h3>Extra profile information</h3> <table class=”form-table”> <tr> <th><label for=”company”>Company Name</label></th> <td> <input type=”text” class=”regular-text” name=”company” value=”<?php echo esc_attr( get_the_author_meta( ‘company’, $user->ID ) ); ?>” id=”company” /><br /> <span class=”description”>Where are you?</span> </td> </tr> </table> <?php } add_action( ‘show_user_profile’, ‘custom_user_profile_fields’ ); add_action( ‘edit_user_profile’, ‘custom_user_profile_fields’ … Read more

How to disable the “Post Lock/Edit Lock”?

As an addition to @birgire answer… Findings register_post_type() allows to register a post type support, which can as well be done later on using add_post_type_support(). And that can get checked against even later using the all mighty post_type_supports( $cpt, $feat ). A general mini plugin that adds a new feature Now the following (mu-)plugin checks … Read more

When moving a WP site, why does wp-admin redirect to old site?

If this is a single WordPress install, there are a couple database entries with your old domain. Specifically, siteurl and home within wp_options. That said, if the dev URL is temporary, you can also set the following two constants in wp-config.php: define(‘WP_HOME’, ‘http://’ . $_SERVER[‘SERVER_NAME’]); define(‘WP_SITEURL’, WP_HOME . “https://wordpress.stackexchange.com/”); Provided that WordPress is installed in … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)