Let user delete comment on front end only
Let user delete comment on front end only
Let user delete comment on front end only
Re, I think i figure out this topic. To create a user based Term in Custom Taxonomy, i’ve created a meta attached to the term (new WP 4.4 feature) ‘author’ which contains the logged in user ID : add_term_meta($term_id,’author’,get_current_user_id()); and then to retrieve the user who has created the term : $author = get_the_author_meta( ‘user_nicename’, … Read more
Deleting anonymous wp_users function not working?
Use the function current_user_can( $capability ). Where $capabilty applies. For example: If ( current_user_can( ‘update_plugins’ ){ //do some update plugin stuff }
Access level seems to have gone from admin to editor
You really should rename your field names with a hyphen (-) instead of an underscore. There is no solution for that other than replacing the underscores (_) for the hyphens (-) I read somewhere that the problem is with the new php naming conventions and when used in functions, it separates the words when an … Read more
I believe your issue is related to getting the correct post object on your single post page. From what I can detect from your question is that $post does not contain the post object which you expect. You must remember, $post is one of those very crappy globals which WordPress uses to store the current … Read more
Sounds to me like “Profiles” should be a custom post type with custom fields. You can then relate the profiles to the users via a custom taxonomy or even more crudely by just storing the Profile post ids as meta data of the User. This would give you the flexibility of offering multiple profiles for … Read more
How to bulk change user role to “No role for this site”
To fetch users from a specific role, you can use the role parameter of the get_users function. Each role has a specific ID; for WordPress’ native roles, these are administrator, editor, author, contributor and subscriber. In your case, you would want to fetch only subscriber users: $allUsers = get_users( array( ‘orderby’ => ‘post_count’, ‘order’ => … Read more