0
votes
0answers
21 views

Join wp_users and wp_usermeta

I have a custom user meta named created_by, which is the ID of creator of this user. I want to create a view table like this for example: ID user_login created_by 2 andi admin How to ...
0
votes
2answers
18 views

Get meta value and associated user meta

I'm working on a site where users are able to publish posts with custom fields associated with them. I want to display meta values from all posts, and include which user created the post where the ...
1
vote
1answer
28 views

How to store custom user data on the database?

I'm developing a WP multi-site network which have a goal of 10,000 sub blogs. The site needs to store custom data related to the user. There are additional 20 fields of data for each user. What is the ...
0
votes
0answers
13 views

Update_user_meta fails with ajax when used multiple times quickly

I'm trying to update the status of the sidebar (visible or hidden) when the user clicks the hide/show button in the user_meta so that no matter what computer he's on, he'll see his settings saved. ...
0
votes
0answers
36 views

wp_usermeta key problem

I am trying to add a meta key to wp_usermeta but it does not work at all. The key would get value from a checkbox. I used the code from Wordpress codex tutorial and it's not adding anything. I will ...
0
votes
1answer
23 views

Wordpress Author Information show paragraph?

In back-end I'm update 3 paragraph in Author information. But it's showing frontend it's collapsed. And not showing paragraph. How to fix this problem. Ex: paragraph 1. paragraph 2. paragraph 3. ...
0
votes
1answer
23 views

SELECT from wp_users, get Displayname too

SELECT post_author, count(ID) as amount FROM dbold_posts WHERE WEEKOFYEAR( post_date ) = WEEKOFYEAR( NOW() ) AND post_status = 'publish' AND post_type = 'post' GROUP BY post_author ...
1
vote
3answers
31 views

get_*_meta doesn't always return an array

I find it annoying that functions like get_user_meta or get_post_meta will return an array if the meta key exists or false if it doesn't. This means I need to do a check like so: $meta = ...
0
votes
1answer
23 views

Why checkbox is not saved in user profile page?

I added new options in user profile page. I added checkbox but it is not saving if all multiple options are checked. <input type="checkbox" name="neww" class="neww" value="one"<?php ...
0
votes
1answer
25 views

Hide user fields based off capability

I'm struggling with this one. I am trying to hide 2 user profile fields for the current user. Only the admin or user with "edit_users" capability should be able to view/edit these fields. Code: ...
0
votes
1answer
49 views

Delete user from frontend

Hi I am working on a frontend admin where a user must be able to delete his account. current_user() is a custom made function of me that retrieves the user meta data. Does anyone know how I can make ...
0
votes
0answers
24 views

get_the_author_meta not working when sending emails

I can't seem to get "get_the_author_meta" working when sending welcome emails to users. I want to customize the content based on custom user meta. I can pull it in just fine on the front end, but I ...
0
votes
1answer
28 views

Minimize database queries to user tables?

I'm trying to come up with a strategic way to collect large amounts of usermeta data (and output to the screen) while keeping database queries low. Some pages, like the home page, single pages, and ...
0
votes
1answer
55 views

Updating User Meta with SQL Query

I have a Wordpress site that needed to have 9,000+ users imported to set up a Directory Listing. I imported them from an existing MySQL (non-wordpress) database and everything imported just fine. ...
0
votes
1answer
21 views

Store Foreach in user profile

I use a foreach to get visits / visitors per month with Analytics API. I need to store the results in the user profile the way it is displayed with an echo. I tried this but I don't get the right ...
0
votes
0answers
17 views

Save automatically data to user profile once or twice a day [duplicate]

The main goal : I am working on a panel which will display statistics of my user websites (external website). For that, I use the Google Analytics API. I save the Google Analytics profile number in a ...
0
votes
1answer
45 views

How to delete user meta by key

I'm a beginner with WordPress plugin api, php and ajax. I'm coding a training plugin for myself to save posts article to read them later, like favourites on web browser, with folders. I use oop to do ...
0
votes
1answer
21 views

Display and Update User Custom Meta via user-edit.php

Is there a For/Loop available to display all the available WordPress User Custom Meta Data so that when on the user.edit.php screen you can see and update all custom metadata? I understand methods ...
0
votes
1answer
40 views

Assign random (and unique) user meta upon registration

When a user registers, I need to assign a random but unique, 4-digit number as user meta data. The number will be static and not change: Not by the user himself or any user with a higher capability. ...
0
votes
1answer
74 views

WP Cron: Save third party data as user meta

Editors note: Twitter ID and Google Analytics only serve as examples and are exchangeable. TL;DR I want to save external data in a user profile once or twice a day. I added two custom fields in my ...
0
votes
1answer
27 views

Set user ID at time of wp_create_user

I'd like to add a new user to the WordPress user table. The code for wp_create_user works fine but it is adding the user incrementally to the next available ID in the user table. Instead, I want to ...
0
votes
1answer
36 views

Add new user and add meta at once

I am working on a custom sign up proces where a user first fills in his name and email, then receives an activation e-mail and then the sign up proces continues. The e-mail contains an activation ...
3
votes
1answer
108 views

Connect Users and Taxonomies

I'd like to send email notifications when new posts are saved. But users can select post categories they want to subscribe to. Available plugins are no solution to me – I really need my own code base. ...
0
votes
0answers
18 views

Adding a function-based search to the Users admin page

On the Users admin page, I want to add a function-based search criterion. By default, there are filters to search by user role and there is a search box that searches the user data. I would like to ...
0
votes
1answer
40 views

Meta box with front-end styling

I have a specific Gallery post of products that I release at the start of every Monday on my website, which differs from my other Gallery posts. These types of Gallery post don't require the Authors ...
0
votes
1answer
71 views

wordpress simple post multi rating with post_meta and user_meta

I am trying to create a multi criteria post rating function with simple form and post_meta and user meta. The Goal when users submits their ratings 2 things should happen: 1.the ratings is stored ...
0
votes
1answer
60 views

Get author meta of all writers

We know from the docs that you can get an author's meta like so: <?php get_the_author_meta( $field, $userID ); ?> But I would like to have a custom "About us" page which displays all the ...
1
vote
0answers
49 views

How to save the date/time of last update of an extra user profile field?

I have a function that adds and saves very well an extra field to the user profile. But, because the content of this field gets old very quickly, I need to know when the user refreshed it last time - ...
4
votes
1answer
85 views

How to create a template for a custom URI associated with the user

I am working on a site where I am using a plugin called Favorite Posts so logged-in users can add a post (a custom post type) to their favorites. I created a page called my-favorites which allows the ...
0
votes
0answers
39 views

Use and get custom user metadata

I wanted to check if a post custom field matches the logged user's custom metadata. If it does then list only posts that match. I think that's possible.
0
votes
1answer
29 views

Conditionally process comments while ignoring replies

I use a WordPress theme that awards users points (kept track of in user meta-data) for posting comments. However, they are not awarded points for replying to a comment. When I move a comment to the ...
0
votes
0answers
9 views

Add_action not updating user_meta when trashing multiple checked posts

I have a point system to my wordpress theme. I've recently added a function that removes one point from the member if I remove their post. However, when I check and remove multiple posts in the ...
0
votes
0answers
46 views

get_userdata() not working in my plugin

i am using get_userdata() function in my plugin but it is not showing any values, it is showing blank result. I am able to see the value present in phpmyadmin. I am using it in a plugin ...
0
votes
1answer
43 views

Multisite - Echo admins profile meta

I'm having a problem with echoing the admin's profile meta in a custom post type template. It used to work, but for some reason it's not working anymore. I'm not aware of any changes made that would ...
2
votes
0answers
66 views

Content hooks vs User hooks

This is more of a theory question than a question with a direct answer. I've been working with different actions for firing functions when a post is updated or deleted and when users are updated or ...
0
votes
1answer
41 views

User meta and public function security

I am using stripe to setup a system of buying credits, which can be used on my wordpress site. I save credits using wordpress user meta, and I increment those credits after a successful transaction ...
0
votes
1answer
45 views

How does adding custom meta to signup form work?

Following along with the answer posted here, How to add Custom Blog Options to new blog setup form? I am attempting to understand why the custom meta is added to the options table for the blog as ...
0
votes
0answers
139 views

How to Update User Meta Field other than from profile?

I have created a dynamic meta field that is generated for each post type. I used the following to create the meta-field: <?php $args=array( 'post_type' => 'Course', 'status' => ...
0
votes
0answers
38 views

User Meta not Updated?

I've gone in and give custom meta fields for the users in the database, and have assigned all the appropriate values to them. I also have a page set up with all of the users being displayed with the ...
0
votes
1answer
12 views

User's Comments Number: Storing it in a meta field for different uses

As I am building a new website where tracking users' information is key to engage, etc..., I found it important to be able to store users' number of counts as a meta. The main reason for storing the ...
0
votes
2answers
88 views

Let user select their own category

I would like to let category editor appear to any user and user can edit their preferred category(ies). For example: the category is about kind of job or profession and there are 10 ...
3
votes
2answers
301 views

user_login vs. user_nicename

When you call the get_users() functions, a list of user objects are returned. Each of those users has a number of properties. What is the difference between user_login and user_nicename in those ...
0
votes
1answer
78 views

Dynamically Generating User Meta Field

I have an online education website using WordPress. I have a custom post type called "course" which is created automatically through the e-learning plugin I am using "WooThemes Sensei". I am still in ...
1
vote
1answer
65 views

Last Login in number of days format

I am trying to capture last user active date and reproduce that into another user-meta field in days only without any text with it. Being very bad with coding, I was hoping someone could help me shed ...
0
votes
0answers
246 views

Update user meta using Ajax on front end?

I would like to update some user meta information from the front end of a WordPress page when the user clicks on a button. I am attempting to pass along a string of data, and then updating the field ...
1
vote
1answer
66 views

Store user's registration date as meta

I am trying to modify the following code to register it as a meta field in the user's profile to have registration date as a meta field. This would allow me to reach the information easily and ...
0
votes
1answer
60 views

Updating User Meta from Custom Post Field Upon Publish Not Working

I'm trying to get the user_meta to be updated based on the custom post field type. However the information won't transfer if the new post is published by a user through a frontend form. Currently it ...
0
votes
1answer
81 views

Reordering fields in registration form via custom plugin

I'd like to reorder the fields in the default WP registration form. I'm adding additional fields with my plugin but they are appearing below the username and email fields. My code is below (it's ...
-1
votes
1answer
120 views

how to add radio field on user meta on function.php?

i have added gender filed on user meta it is not value <?php add_action( 'show_user_profile', 'show_extra_profile_fields', 10 ); add_action( 'edit_user_profile', 'show_extra_profile_fields', 10 ...
0
votes
1answer
74 views

Display and Allow users to edit their own profiles

I'm working on a site that would have different categories of users, and each user will have his own user profile page with a vanity URL, which he can share with others. The users are divided into ...