Skip to content

Instantly share code, notes, and snippets.

View karlschwaier's full-sized avatar

Karl Schwaier karlschwaier

View GitHub Profile
<!DOCTYPE html>
<!--[if lt IE 7]> <html lang="de" class="no-js lt-ie9 lt-ie8 lt-ie7"> <![endif]-->
<!--[if IE 7]> <html lang="de" class="no-js lt-ie9 lt-ie8"> <![endif]-->
<!--[if IE 8]> <html lang="de" class="no-js lt-ie9"> <![endif]-->
<!--[if gt IE 8]><!--> <html lang="de" class="no-js"> <!--<![endif]-->
<head>
<meta charset="UTF-8">
<title>Template</title>
<meta name="description" content="">
@karlschwaier
karlschwaier / update_wp_user_level
Last active August 29, 2015 14:16
WordPress - Fix missing or empty author dropdown
// Update wp_user_level values to fix empty author dropdown
// Good explanation of the problem at http://ihisham.com/2014/05/wordpress-fix-missing-users-from-authors-dropdown-list/
// Get all users
$users = get_users();
foreach ( $users as $user ) {
// Define user level by user role
switch ( array_shift( $user->roles ) ) {
case 'administrator':