How to change the default registration email ? (plugin and/or non-plugin)

The new user email is sent using the wp_new_user_notification() function. This function is pluggable, which means that you can overwrite it: // Redefine user notification function if ( !function_exists(‘wp_new_user_notification’) ) { function wp_new_user_notification( $user_id, $plaintext_pass=”” ) { $user = new WP_User($user_id); $user_login = stripslashes($user->user_login); $user_email = stripslashes($user->user_email); $message = sprintf(__(‘New user registration on your blog … Read more

How to create custom URL routes?

Add this to your theme’s functions.php, or put it in a plugin. add_action( ‘init’, ‘wpse26388_rewrites_init’ ); function wpse26388_rewrites_init(){ add_rewrite_rule( ‘properties/([0-9]+)/?$’, ‘index.php?pagename=properties&property_id=$matches[1]’, ‘top’ ); } add_filter( ‘query_vars’, ‘wpse26388_query_vars’ ); function wpse26388_query_vars( $query_vars ){ $query_vars[] = ‘property_id’; return $query_vars; } This adds a rewrite rule which directs requests to /properties/ with any combination of numbers following to … Read more

Get name of the current template file

You could set a global variable during the template_include filter and then later check that global vairable to see which template has been included. You naturally wouldn’t want the complete path along with the file, so i’d recommend truncating down to the filename using PHP’s basename function. Example code: Two functions, one to set the … Read more

Jquery Slider for profile template

You can use carousel javascript to get the desired output. There are various carousel available, you can use some thing like jcarousel. Download the js and css from the jcarousel website and en-queue it in your theme to use it. Note : You will have to manage the dependencies of it with jQuery. Let me … Read more

WordPress: save `get_template_part()` to variable

This isn’t what get_template_part was for, get_template_part essentially behaves like PHP’s require function. Justin Tadlock writes a lot more about this here and also talks about a WordPress function that might be more useful to you – locate_template. Alternatively, if you did want to hack this functionality using get_template_part, you could use template buffering:

Template constructor in a class template – how to explicitly specify template argument for the 2nd parameter?

Fixing your code, the following would work: You cannot use T for the class template parameter and the constructor template parameter. But, to answer your question, from [14.5.2p5]: Because the explicit template argument list follows the function template name, and because conversion member function templates and constructor member function templates are called without using a function name, there is … Read more