Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

I was thinking about either getting a plugin or shortcode to create custom field that shows on user and allows admin to change them and edit the information, not users.

For example, if we have wp site where 5 members are registered under admin and there are tasks that admin wants to show in their profile page. so there has to be non editable text area. so that member can view the task if they are logged in. It could show either on dashboard page or any other specific non editable widget.

Is it possible? any pointers for this particular task? links?

share|improve this question
    
Take a look at this answer of mine: wordpress.stackexchange.com/a/51629/12615 - It creates a custom user meta field in users profile page, editable only by Admins, that shows up in each user's Dashboard as a personalized widget. –  brasofilo Jul 28 '12 at 23:54
    
@brasofilo Can you mark posts as "duplicate" (close vote)? –  kaiser Jul 29 '12 at 12:58
    
Yes, indeed...: possible duplicate of Custom Dashboard Widget with Custom Notification from Admin, How to? –  brasofilo Jul 29 '12 at 13:01
add comment

1 Answer 1

up vote 1 down vote accepted

I just found this plugin which allows you to create custom options http://wordpress.org/extend/plugins/custom-options-plus/faq/

You can then place the php code to display the value of the option inside your dashboard for members who are logged in but not administrators. You can display the value as text wrapped in a div tag and style as you need.

Using the plugin I have linked to you can create two options one called 'members' another called 'guests', now that you have control of these variable values through your dashboard as the administrator the code below should display these messages accordingly to your members if they are logged in or not logged in.

An example php function may look like this

<?php 
if ( is_user_logged_in() ) {
echo get_custom('members');

} else {
echo get_custom('guests');
}; ?>
share|improve this answer
    
Thanks I will take a look at the code. I wonder if this plugin allows me to showcase user info in widget? –  Ryu Jul 28 '12 at 22:37
    
You can use any of the plugins which allow php code in widgets then simply add the php code to the widget to display the options value –  Anagio Jul 28 '12 at 22:38
    
@Anagio Examples are always appreciated. The site is meant to hold the code and keep answers as close to working solutions as possible. Thanks :) –  kaiser Jul 29 '12 at 1:28
    
@kaiser updated with an example using the plugin I linked to –  Anagio Jul 29 '12 at 3:12
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.