Tag Info

Hot answers tagged

2

I found a way to get it done but I am not very happy with this procedure. Please add your answer if you find better way. Mean while, this might be of help. add_action('admin_head-edit.php','addCustomImportButton')); I only need this on edit page, so I am using admin_head-edit.php action, but you can use admin_head or some other (not very specific ...


2

Add a meta box to your custom post type edit screen to contain your markup. Check the $pagenow global to only show it on post.php, not post-new.php, and check $current_user global for administrator role to exclude other user roles. Also, if you aren't familiar, check out the $wpdb class for your queries, and read up on using AJAX in WordPress. EDIT use ...


1

Something like this should point you in the right direction: function updateUser($newPassword = '', $newEmail = ''){ $update = array(); if(!empty($newPassword)) $update['user_pass'] = $newPassword; if(!empty($newEmail)) $update['user_email'] = $newEmail; if(!empty($update)){ $update['ID'] = wp_get_current_user_id(); ...


1

You should place this function into your theme's functions.php. Never mess with the core WordPress files (anything in the wp-includes, wp-admin directory). An error can lead to a non functioning site, and the files get updated. WordPress never updates your custom themes, so this is the way to go. Of course, if you have a lot of functions, you can create a ...



Only top voted, non community-wiki answers of a minimum length are eligible