How to incorporate admin theme in my back-end-plugin

Building admin interfaces in WordPress is quite ad hoc. Which is historical reason for many of those interface looking nothing like WP admin surrounding them.

In general it works in terms of markup, rather than colors. You don’t code in terms of “black” or “red”, but in semantic terms like “primary” or “notification”.

There are are some plugins/guides out there that help figure out markup (for example WP Admin Pattern Library) but they aren’t really complete/official/whatever.

So in general the process loosely works as following:

  1. Find a part of native WP admin with elements you need.
  2. Ripoff and reuse HTML markup of those elements.
  3. Fine tune whatever is missing with your own CSS.
  4. Keep an eye out for changes in markup with new WP releases (it likes to fiddle and keep admin pretty every couple years).

Leave a Comment