This post will teach you that how to add custom fields to user profile in WordPress. For example you want to add some extra information like user’s facebook link , hobbies, games he plays etc. Add extra fields to a wordpress user profile is easy. Following code will show that how to add fields. Continue reading “Add Custom Fields to User Profile in WordPress”
You can get list of all registered filters and hooks in wordpress using global variables $wp_filter and $wp_actions. Please see following example.
Example 1 global $wp_filter , $wp_actions; echo '<pre>'; print_r( $wp_actions ); print_r( $wp_filter ); echo '</pre>';
If you want to get list of a specific filter then use as follows example.
Example 2 gloabl $wp_filter; $spec_filter = 'the_content'; echo '<pre>'; print_r( $wp_filter[ $spec_filter ] ); echo '</pre>';
Syntax : wp_enqueue_script( ‘script-name’, get_template_directory_uri() . ‘/js/example.js’, array(), ‘1.0.0’, true );
You can override default layout of search form in wordpress. It is easy in WordPress. In your theme where you want search form in your custom html code then first add this code. Continue reading “Override search form layout in WordPress”
First write following code in template file. These code will include js and datepicker class in the template.
wp_enqueue_script('jquery'); wp_enqueue_script('jquery-ui-core'); wp_enqueue_script('jquery-ui-datepicker'); wp_enqueue_style('jquery-ui-css', 'http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.2/themes/smoothness/jquery-ui.css');