Creating User Profiles using author.php

get_the_author_meta( ‘ID’ ) gets the ID of the author of the current post. If there’s no post there’s no author. Use get_queried_object_id() instead. When used on author archives (i.e. author.php) it will be the ID of the author, regardless of whether or not they have posts.

add_cap for editor but no admin role

Giving the capability to delete and edit users would compromise your security, as then the editors would have the ability to modify your profile too. What you could do is just give the create_users capability to the editors. But the users thus created would be allotted “Subscribers” role by deafult. EDIT: Try the following code … Read more

How to pull user/author profile data in a plugin?

If you’re trying to get user data for the displayed profile, you can do it like so: $thisauthor = get_userdata(intval($author)); That’ll return an object filled with everything you need. For instance, if you need the user ID, you can call it like so: $thisauthor->ID I use this extensively on the profiles on my site: http://androidandme.com/user/clark … Read more

Is author.php a core file?

If you are talking about author.php in your theme directory, usually at wp-content/themes/<YOURTHEMENAME> this isn’t a core file but part of your theme. Themes don’t get changed when WordPress is updated, so concerning WordPress updates themes are safe. But if your theme isn’t custom made by you (which I assume here) this file would be … Read more

WordPress Stripping Colons?

No idea why your colons are getting stripped out. Your original code, or @EAMann’s answer, should both work unless you have some very strange filter going on. But using built-in functions to get permalinks should make your life easier in general than trying to concatenate them yourself. Try this: <a href=”https://wordpress.stackexchange.com/questions/34822/<?php echo get_author_posts_url( $curauth->ID ); … Read more