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…
Author: Arvind Kumar
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.
Clearing Activacollab 3.x cache through script
With upgrading to AC3 the old clear_cache_by_pattern(“*”) stopped working. There’s option at admin but i wanted a more shortcut way to clear cache, just by entering a url in browser window.
Creating custom authentication or one time access page in ActiveCollab
Creating a one time authentication in ActiveCollab. The example was taken from the developer’s guide at ActiveCollab website. When i checked this one first time the file structure mentioned in the guide and the actual file structure in AC 3.1.16…
Useful php debug function to output data with line number
A very useful php debug function i like to use to print debug output to browser window. In some cases where i may not output the debug to browser window i use the same php debug function to receive debug…
Capitalize, Uppercase, Lowercase Online
Different code editors do have different keyboard shortcuts to do Capitalize, Uppercase and Lowercase of text. Generally, i use EditPlus as code editor which has shortcuts for uppercase and lowercase but it does not seem to have a shortcut or…
How to know whether an element existed with jQuery
For the reference. In general javascript we can check for the existence of an element using the method below: if(document.getElementById(‘element_id’)) { //element exists } else { //element does not exist }