Split Blog Into Two Sections?

My first thought was to create 2 main categories. Exclude one from the wordpress loop on index.php and then only show that category on a different page. The only problem with this method is that the users would have to make sure they are posting in the correct category. However if you used a plugin … Read more

How to delete user on logout and when session expires?

So this is what I did…also keep in mind this is for a multisite and I am call calling this within a class. ‘Client’ is a custom user role that is create and given to users when they are created. function delete_user() { global $current_user; if(in_array(‘client’, $current_user->roles )){ if(!function_exists(‘wp_delete_user’)) { include(ABSPATH . “wp-admin/includes/ms.php”); } wpmu_delete_user( … Read more

Get tags for current user

The currently logged in user The \WP_User object/instance can be retrieved via: $user = get_current_user(); There’s a shortcut API wrapper to fetch the ID: $user_id = get_current_user_id(); $wpdb and the WP “DBAL” WP basically uses $wpdb as DBAL/Database Abstraction Layer. It got plenty of public methods and some higher level wrappers for convenient access. One … Read more