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

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; }

Adding filter to the title without affecting the menu title

Since you’re generating things on the fly, we can use a global flag to let us know when we want the title applied. add_filter(‘the_content’, function($content){ if(is_page(‘compare’)){ global $asin_doing_template; // mark that we’re doing a template $asin_doing_template = true; $asin = esc_attr($_GET[‘asin’]); $data = get_data($asin); $smarty->assign(‘item_data’, $data); $content = $smarty->fetch(‘file.tpl’); // set it back to false … Read more