Force file download instead of open in browser

We can configure apache servers to force download files instead of shown in browser window. For example if you want to download Image , MP3 file when you click on that file link , you can use following code in .htaccess file.

<FilesMatch "\.(mov|mp3|jpg|png|pdf)$">
 ForceType application/octet-stream
 Header set Content-Disposition attachment
</FilesMatch>

Use WordPress default jQuery UI “datepicker” in your theme

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');

Continue reading “Use WordPress default jQuery UI “datepicker” in your theme”