How I Created a Custom Admin Theme WordPress 3.3+

 

 

I had  a customer wanting a let’s just say an Etsy clone. Well in order to use certain functions the administrator had to have back-end access so here is what I did in order to remove the WordPress feel completely.

Theme is Gridmarket Theme

1. I downloaded these plugins and set them up:

  • CodeStyling Localization- Change  the word WordPress to blogname and  the word site to store also transferred all wp help links to custom help page I made.
  • Custom Admin Bar- I used to insert a our logo (under 100px height) and clear other admin bar links since the admin bar is now the menu. I completely got rid of the leftside menu with CSS.
  • Global Hide/Remove Admin Bar Plugin- Now that I was using the adminbar as the menu it looked funny when viewing the site so I used this plugin to completely remove it from when ‘viewing the site’  for administrators all the way down to the subscriber role
  • Site Wide Text Change-  double check changing words (i.e. WordPress to blogname)  and alot easier
  • Theme My Login- easily login/out without seeing wordpress look and it uses your theme in the background and has bunches of more tweaks
  • Web Editors CMS- hiding dashboard wasn’t successful so I used this plugin to remove all options and create a welcome message for the dashboard, the plugin above can redirect logged in users somewhere instead of the dashboard
  • MarketPress- better than any ecommerce plugin even wp-commerce!

2. Now that I was using the wp admin bar as the menu. I had to add the links to the admin bar, BUT  the site was a multisite – I had to make sure the blogurl would change for each administrator.  Here is the tutorial that accomplished that for me:

http://www.gravitationalfx.com/how-to-add-and-remove-wp-admin-bar-links/

also here is the code I used that does the trick- hook it to your theme’s functions.php file:

function mytheme_admin_bar_render() {
 global $wp_admin_bar;
$wp_admin_bar->remove_menu('updates');
$generalurl = get_bloginfo('url') . '/wp-admin/options-general.php';
 $wp_admin_bar->add_menu( array(
 'parent' => false,
 'id' => 'general_product',
 'title' => __('General'),
 'href' => $generalurl
 ));
$profileurl = get_bloginfo('url') . '/login/?action=profile';
 $wp_admin_bar->add_menu(array(
 'parent' => 'general_product',
 'id' => 'p_profile',
 'title' => __('Your Profile'),
 'href' => $profileurl
 ));
$chguserurl = get_bloginfo('url') . '/wp-admin/users.php?page=change-email';
 $wp_admin_bar->add_menu(array(
 'parent' => 'general_product',
 'id' => 'p_user',
 'title' => __('Change Email'),
 'href' => $chguserurl
 ));
 $chgpassurl = get_bloginfo('url') . '/wp-admin/users.php?page=change-password';
 $wp_admin_bar->add_menu(array(
 'parent' => 'general_product',
 'id' => 'p_pass',
 'title' => __('Change Password'),
 'href' => $chgpassurl
 ));
 $producturl = get_bloginfo('url') . '/wp-admin/edit.php?post_type=product';
 $wp_admin_bar->add_menu( array(
 'parent' => false,
 'id' => 'efko_product',
 'title' => __('Products'),
 'href' => $producturl
 ));
 $productnewurl = get_bloginfo('url') . '/wp-admin/edit.php?post_type=product';
 $wp_admin_bar->add_menu(array(
 'parent' => 'efko_product',
 'id' => 'p_new',
 'title' => __('Add New'),
 'href' => $productnewurl
 ));
 $mediaurl = get_bloginfo('url') . '/wp-admin/upload.php';
 $wp_admin_bar->add_menu(array(
 'parent' => 'efko_product',
 'id' => 'media_images',
 'title' => __('Images'),
 'href' => $mediaurl
 ));
 $caturl = get_bloginfo('url') . '/wp-admin/edit-tags.php?taxonomy=product_category&post_type=product';
 $wp_admin_bar->add_menu(array(
 'parent' => 'efko_product',
 'id' => 'p_categories',
 'title' => __('Categories'),
 'href' => $caturl
 ));

 $tagsurl = get_bloginfo('url') . '/wp-admin/edit-tags.php?taxonomy=product_tag&post_type=product';
 $wp_admin_bar->add_menu(array(
 'parent' => 'efko_product',
 'id' => 'p_tags',
 'title' => __('Tags'),
 'href' => $tagsurl
 ));
 $usersurl = get_bloginfo('url') . '/wp-admin/users.php';
 $wp_admin_bar->add_menu( array(
 'parent' => false,
 'id' => 'efko_users',
 'title' => __('Users'),
 'href' => $usersurl
 ));
$addnewurl = get_bloginfo('url') . '/wp-admin/user-new.php';
 $wp_admin_bar->add_menu(array(
 'parent' => 'efko_users',
 'id' => 'p_add_new',
 'title' => __('Add New'),
 'href' => $addnewurl
 ));

 $ordersurl = get_bloginfo('url') . '/wp-admin/edit.php?post_type=product&page=marketpress-orders';
 $wp_admin_bar->add_menu( array(
 'parent' => false,
 'id' => 'manage_orders',
 'title' => __('Orders'),
 'href' => $ordersurl
 ));

 $msgsurl = get_bloginfo('url') . '/wp-admin/edit.php?post_type=product&page=marketpress&tab=messages';
 $wp_admin_bar->add_menu( array(
 'parent' => false,
 'id' => 'manage_msgs',
 'title' => __('Messages'),
 'href' => $msgsurl
 ));

 $commentsurl = get_bloginfo('url') . '/wp-admin/edit-comments.php';
 $wp_admin_bar->add_menu( array(
 'parent' => false,
 'id' => 'comments',
 'title' => __('Comments'),
 'href' => $commentsurl
 ));

 $settingsurl = get_bloginfo('url') . '/wp-admin/edit.php?post_type=product&page=marketpress';
 $wp_admin_bar->add_menu( array(
 'parent' => false,
 'id' => 'settings',
 'title' => __('Store Settings'),
 'href' => $settingsurl
 ));

 $couponsurl = get_bloginfo('url') . '/wp-admin/edit.php?post_type=product&page=marketpress&tab=coupons';
 $wp_admin_bar->add_menu(array(
 'parent' => 'settings',
 'id' => 'p_coupons',
 'title' => __('Coupons'),
 'href' => $couponsurl
 ));

 $paymentsurl = get_bloginfo('url') . '/wp-admin/edit.php?post_type=product&page=marketpress&tab=gateways';
 $wp_admin_bar->add_menu(array(
 'parent' => 'settings',
 'id' => 'payments',
 'title' => __('Payments'),
 'href' => $paymentsurl
 ));

 $shippingurl = get_bloginfo('url') . '/wp-admin/edit.php?post_type=product&page=marketpress&tab=shipping';
 $wp_admin_bar->add_menu(array(
 'parent' => 'settings',
 'id' => 'p_shipping',
 'title' => __('Shipping'),
 'href' => $shippingurl
 ));

 $logouturl = get_bloginfo('url') . '/login/?action=logout';
 $wp_admin_bar->add_menu( array(
 'parent' => false,
 'id' => 'p_logout',
 'title' => __('Logout'),
 'href' => $logouturl
 ));
}
add_action( 'wp_before_admin_bar_render', 'mytheme_admin_bar_render' );

3. Last the CSS

Copy the code- here   for admin area.

Or buy my plugin at wpquickadminthemes.com, thanks.


 

Written by

5 Comments to “How I Created a Custom Admin Theme WordPress 3.3+”

  1. Very nice tutorial – Short, sweet and helpful! Thanks muchly :)

  2. Micheal says:

    any chance this will work with wordpress 3.5 with buddypress installed on a multisite install?

  3. Oscurohombre says:

    Well done! But!
    How did you bring all of this together in a plugin? Could you explane abit of these?

  4. Jessica says:

    You can buy the best plugin at wpquickadminthemes.com $15

Leave a Reply

Message