Show image next to the comment author if have certain role

Conditional tags are used to change content on the basis of what conditions a page meets. While there are no conditional tags depending on a user’s role, this is how you can manipulate content depending on roles: Display content to the user, depending on his role <?php global $current_user; get_currentuserinfo(); //not strictly required, $current_user should … Read more

Removing capabilities from cloned admin role

For a list of capabilities by user level, check the Roles and Capabilities Codex page. The capability that would allow a user to change a theme header would probably be edit_theme_options, but I bet it would give your editors more capabilities than just messing with the header, though. It’s hard to say for sure without … Read more

How to hide plugin options for editors via functions.php

This should be easiest way, just add the line to wp-config.php, this will disable plugin and theme editor, both. define(‘DISALLOW_FILE_EDIT’,true); If you want to add codes into theme’s function, the code should work for you. function ra_block_tp_edit( $caps, $cap ) { if($cap == ‘edit_plugins’ ) $caps[] = ‘do_not_allow’; return $caps; } add_filter( ‘map_meta_cap’, ‘ra_block_tp_edit’, 10, … Read more

Send confirmation email when a user’s role is upgraded

Send email notification when user role changes – Adding this snippet to the functions.php of your WordPress theme will send the member an email notification when the user’s role has changed. function user_role_update( $user_id, $new_role ) { $site_url = get_bloginfo(‘wpurl’); $user_info = get_userdata( $user_id ); $to = $user_info->user_email; $subject = “Role changed: “.$site_url.””; $message = … Read more

How to create a front facing user sign up, log in and profile pages like FoodGawker.Com [closed]

In another question of yours, you were pointed to the plugin WP Favorite Posts, but you seem to have settled with this premium one from Code Canyon. So, the matter is how to integrate it with a Profile/Registration management plugin, and for that maybe Theme My Login would be a good candidate, as you can … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)