Refers to accounts with the ability to login and participate in a WordPress site.

learn more… | top users | synonyms (1)

1
vote
3answers
4k views

get_current_user_id() returns 0?

I'm trying to get the currently login user's id in WordPress. I've used the following code: function users_list() { global $current_user; $current_user = wp_get_current_user(); echo 'User ...
1
vote
1answer
93 views

Completely hide user info

I'm wondering if there's a way to make 100% sure a user's info is not available to the public. Our theme is not currently using a profile page, but I did notice that there is a 'Posts by author' page ...
1
vote
1answer
494 views

Removing Wordpress Plugin Menu Item for a specific user

I want to remove certain dashboard menu times for a specific user. Now this menu consist of plugin menu items as well. One particular plugin I want to hide from the user is Contact Form 7. Here is ...
1
vote
2answers
387 views

Associate Page with User

We currently have a setup where anyone can register as a user and their own 'page' gets created manually by admin. We need a menu option to be something like 'View Your Page' and direct a user to ...
1
vote
1answer
193 views

How can I secure a WordPress blog using OpenID from a single provider?

We're about to launch an internal blog for the company I work at. Much of the blog will be available to the public, but certain posts will be for employees only. Our intranet/extranet has an OpenID ...
1
vote
1answer
912 views

How to delete all post and attachments of a user when I delete it?

When I delete a user, WordPress can just delete the post or page of this user, not his custom post and his attachments. An idea for a special hook? add_action( 'delete_user', 'my_delete_user'); ...
1
vote
1answer
201 views

Users disappeared from wp-admin

I have a WordPress multisite network and the question is related to one of my sites on that network. The site has a login page before you can use that site. So I created a user from wp-admin with the ...
1
vote
1answer
2k views

Force display name as full name

Is there a way I can force all users display names to be Firstname Lastname or alternatively change this to be the default?
1
vote
2answers
1k views

Allow users to post to a certain category

I have a website running Wordpress. I have lots of content, e.g. tutorials, and I made a new category on a separate page, so I don't have a lot of content there. I want users to be able to add ...
1
vote
1answer
618 views

How to display only logged in user's post comments in comments area

I am making a custom Wordpress site where School students logged in and add their posts. I am giving them rights to use wp-admin panel with little customization and modification. QUESTION: "How can ...
1
vote
1answer
545 views

How do I list in the backend all users that were assigned to a custom role?

From my previous question How to create and retrieve data from a special registration form? I would like to know how do I list in the backend all users that were assigned to a custom role? Is it ...
1
vote
2answers
1k views

$current_user var returns NULL

I am developing an wp plugin and I am trying to get the current user. If i return with an error print_r($current_user) returns the needed info. But the plugin is activated without an error it ...
1
vote
1answer
597 views

How to migrate wordpress users from one blog to another

I have a client that has a single install outside of her network installation. I need to migrate the users with their passwords into the network installation. I've tried backupbuddy but it seems to ...
1
vote
1answer
2k views

Add User meta fields, which only admin can edit

is there a way to add custom user meta fields (like the one in the profile.php which contain specific user data), but only an admin (or an other user with enough capabilities) can change them? Maybe ...
1
vote
1answer
1k views

How to use WP default post list tables in a plugin?

I'm developping a plugin to manage a base of users and I'd like to show them in the same type of table used in other parts of the WP admin (post lists, user lists, etc.), I'd like to have the same ...
1
vote
3answers
2k views

How can I import users into WordPress?

I have a spreadsheet (XLS) of names, email addresses, and passwords from another content management system. Is there a way to import these folks as users (I think subscriber level, but some may be ...
0
votes
0answers
37 views

Getting invalid user ID error when creating a new user with wp_insert_user

I'm trying to insert users into wordpress from a foreign database and I've prepared my $userdata as foreach ($users_out as $key_u => $value_u) { $user_id = $value_u['writer_id']; ...
0
votes
1answer
21 views

delete_user_meta Delete one value out of array

The code I have is not working cause the value saved as array and I'm not sure how to fix this. // Remove favorite authors from current users DB function fav_author_remove_user(){ ...
0
votes
1answer
39 views

How can I sort get_users() by any value (last_name, user defined fields and more)

I want to sort the result of get_users() by last name, first name, user defined fields or whatever. How can I achieve this while still using get_users()?
0
votes
1answer
54 views

Using a custom field value as current users name [closed]

I'd like to use conditional logic to show a part of the single post page to a specific user. However the problem is Im pulling that username in from a custom field. Below is what I have so far. ...
0
votes
1answer
114 views

Overview with latest edited posts and pages

I'm looking for an overview of all the latest user activities. But I don't want to see comments on this page, just the edits or creations of new posts or pages. Unfortunately I can't find such a ...
0
votes
1answer
155 views

Assigning a role to a specific custom post type (and ignoring other post types)

I have a new post type called "story" And a new role called 'Writer' (w/ a 'publish_story' capability) I want it so that, a Writer when logged in can edit Profile and only edit a custom post type - ...
0
votes
1answer
880 views

Assigning multiple or additional capabilities to specific users or how to create additional roles like bbpress roles?

even though I think I understand the hierarchy of roles in WordPress, I never really bothered creating my own user roles or custom capabilities. What I need to achieve is to assign a few capabilities ...
0
votes
3answers
3k views

How to keep track of user logins?

I have a client with a private Wordpress blog - that is to say, you need to log in to read it. We are using Counterize to keep track of visits to the site and to find the most popular pages. But now ...
0
votes
1answer
66 views

Total number of authors with more than one post

<?php $users = $wpdb->get_var("SELECT COUNT(ID) FROM $wpdb->users"); echo '(', count( get_users( array( 'role' => 'author' ) ) ); echo ')' ?> code by Jan Beck I need to know what ...
0
votes
1answer
230 views

Navigation link to specific user page

I asked this question and got a great reply - Associate Page with User - so I can now associate a post with a specific user as required. What I want to do is include in the main site navigation a ...
0
votes
2answers
6k views

Custom user profile, registration, login page with theme

WordPress user profile page uses the administration interface, and its user registration / login page is not part of the theme. I would like to change it into the custom theme of my site customize ...
0
votes
1answer
786 views

Redirect based on log-in status per JavaScript

I want to check if a user is logged in. If he is, I want to redirect him to page A, and if he isn’t to page B. The redirect should happen per JavaScript after a button has been clicked – so I need ...
0
votes
2answers
324 views

Switch Theme Through Options Panel

Is it possible to allow users when logged in to switch the entire theme through a theme options panel? I don't want users to use the standard wordpress way, but instead just an option in their panel. ...
0
votes
2answers
1k views

What do spammers gain by signing up as a user?

The majority of new user signups I receive on my Wordpress blog look dodgy, with @someblog.com, @somearticle.com, or @gmail.com addresses. What do they gain by signing up as a new user?
0
votes
1answer
1k views

How can I get the last posts by user role?

I have a custom post type ("News"), and a custum user role ("Friends"). How can I get the last "News" written by "Friends" ?
0
votes
1answer
2k views

How to display multiple custom columns in the wp-admin users.php?

I'm using the manage_users_columns to display a custom field I create in the usermeta database called company. My code is as follows: function mysite_column_company( $defaults ) { ...
-1
votes
3answers
937 views

Display link with current user's username in it in Custom Menu

I'd like to add a link to BuddyPress' My Favourite Topics in a Custom Menu. Is there a way to use the current logged in user's username in the link? I mean like the %category% in the permalinks.