How to add a button to check the emails of my domain?

Based on my comment in the Question, I tested the solution of adding a menu item that opens an iframe in its screen. As expected, Gmail doesn’t allow to be displayed in an iframe. But a regular Horde Webmail does work. add_action( ‘admin_menu’, ’embed_webmail_wpse_91871′ ); function embed_webmail_wpse_91871() { // Reference: http://codex.wordpress.org/Function_Reference/add_menu_page // Check it, specially … Read more

Different registration form for different roles

I don’t know how “Cimy User Extra Fields” works, but you can add fields to the user registration page with: function extra_user_profile_fields_wpse_92164() { echo ‘<label for=”extra_field”>’,_(“Extra Field”).'</label>’; echo ‘<input type=”text” name=”extra_field” value=”” size=”25″ id=”extra_field” />’; } add_action( ‘register_form’, ‘extra_user_profile_fields_wpse_92164’ ); To switch subscriber types you could pass in $_GET parameters, which is how the default … Read more

Style product detail page with custom CSS in woocommerce

Try adding classes, instead of restricting the CSS to certain pages. You should be looking for classes that will allow you to apply your styles to those pages only. Usually the CSS for the entire site will be loaded at once and kept in the cache. So don’t try to load the styles only on … Read more

Rating system for users

From what you’ve mentioned, this could be done by adding a new field to the user_meta on the back end. Then, you could use an approach similar to what’s documented here for front end editing by users: How to edit a user profile on the front end?

How to embed a new string in url?

try this add_filter( ‘rewrite_rules_array’,’my_insert_rewrite_rules’ ); add_filter( ‘query_vars’,’my_insert_query_vars’ ); function my_insert_rewrite_rules( $rules ) { $newrules = array(); $newrules[‘(.+?)/custom_post_type_slug/(.+?)/?$’] = ‘index.php?post_type=custom_post_type_slug&dynamic_string=$matches[1]&custom_post_type_slug=$matches[2]’; return $newrules + $rules; } function my_insert_query_vars( $vars ) { array_push($vars, ‘dynamic_string’); return $vars; }

Completely remove ability to create users?

Okay, so the code above does work, but not for super admins, you must explicitly remove permissions from super admins, like this: // restrict super admin capabilites add_filter(‘map_meta_cap’, ‘restrict_super_admins’, 10, 4); function restrict_super_admins($caps, $cap, $user_id, $args){ $super = array( ‘add_users’, ‘create_users’, ); if( in_array($cap, $super) ) { $caps[] = ‘do_not_allow’; } return $caps; }

WordPress truncate posts question (plugin related)

This is a rather sloppily coded plugin, unfortunately. However, to answer your questions: Replace the function gopiplus_clean with this function gopiplus_clean( $excerpt, $length = 0 ) { $string = strip_tags( str_replace( ‘[…]’, ‘…’, $excerpt ) ); if ( $length > 0 ) { $words_array = preg_split( “/[\n\r\t ]+/”, $excerpt, $length + 1, PREG_SPLIT_NO_EMPTY ); $words … Read more