How to add an option to wordpress general settings page i.e. /wp-admin/options-general.php? The dirty way. Put the following snippet in functions.php file:
Month: May 2013
Setting content headers to send WordPress HTML email
Just paste the following code snippet to your functions.php file of your current theme. It will force all emails to be sent in HTML format. [php]function set_html_content_type() { return ‘text/html’; } add_filter( ‘wp_mail_content_type’, ‘set_html_content_type’ );[/php] If you want to set…
How to change WordPress default FROM name & email address
Paste the following code into functions.php file of your in-use theme. Don’t forget to put the desired email address in new_mail_from function(line 5) and desired name in new_mail_from_name function (line 8). If you do not know how to do it…
How to get file extension using PHP
A simple yet powerful approach to get file extension using PHP. We usually need to extract file extension from file name while uploading file so that we could generate new name and rename file to our convenience. We could create…
WordPress + Web.config “not found” error on home page
I was trying to setup wordpress on IIS when i faced this problem. I placed a web.config file with given xml code and pretty urls (permalinks) worked fine on all page except the home page. Home page gave a Not…
How to Fix the “URL is Unreachable” Error in Facebook Comments
Recently, i have been setting up the Facebook Comments plugin on my client’s server. Before trying it on live server i tried to set it up on my development server. It looked to work but with a error “Warning: http://coolum.inimist.com/?p=1 is unreachable.“ where…
Custom search with pagination using query_posts() in WordPress
The number of posts per page is set in Settings > Reading in WordPress. Once this is set, specific number of posts are shown on home page, archive pages, search results page, and so on.