4 08, 2016
  • The Art of Debugging

The Art Of Debugging

To successfully exterminate a bug the first thing you want to do is find the root cause. Do not look at code. It’s compulsory to understand the problem else you will make no progress.  Take a step back, maybe a few steps if needed, and look at the problem from a birds eye view.  An ....read more

27 03, 2016
  • Facebook_Logo

Increase Facebook page app width and height

I recently worked on a project which involved creating a Facebook app using the new Timeline theme for pages. If you need to customize the width and height of the canvas of your Facebook application then add the the following lines of code: -Include the Facebook JS library in your app <script src="https://connect.facebook.net/en_US/all.js"></script> -Add this ....read more

27 03, 2016
  • wordpress-tags

WordPress Popular Tags

Here is a quick way to list/display the most popular tags. The code should be self explanatory, the function "get_tags" is used to get all the tags along with some custom arguments that you can provide to it to get the most popular tags. <?php     $args['orderby'] = 'count';     $args['number'] = '11';//number of tags ....read more

15 05, 2014
  • Wordpress

How to dynamically switch themes in WordPress

Here is how you can dynamically switch themes based on your criteria inside "switch_theme_by_browser" function. For this example I used browser conditions to switch between themes. This feature works best by creating a plugin. Just create a new folder (call it whatever you want) in your plugins folder. Create an index.php file and paste the ....read more

28 07, 2013
  • Ajax

Ajax Cross Browser Communication

The client (browser) can make calls to a different domain then what it currently resides on but this does not necessarily mean that the requested server will accept the request(s). With slight modification on the server this communication can be achieved. For this example I will use PHP as an example but the implementation concept ....read more

22 05, 2013
  • 404 Error

WordPress Custom Post Type 404 Error

Custom Post Types are a wonderful feature in Wordpress and a great mechanism for customization. When implementing this feature you may come across a scenario where you encounter a 404 error when reviewing your custom post type on the browser. The easiest solution that worked for me is the use of the flush_rewrite_rules() function. Just ....read more

19 03, 2013
  • Wordpress Paganation

WordPress Custom Post Type Pagination

Setting up pagination for your custom post type can be easily done on Wordpress. I recently came across a situation where I had to output a list of posts for a custom posts types on a Wordpress page. The following code snippet example will output a list of posts based on your custom post type ....read more

2 02, 2013
  • wordpress permalink url

WordPress Unable To Change Permalink URL

I recently was working on a custom page that required a unique URL. That's pretty easy to do on Wordpress right? Just create a new Page and click on the "Edit" button to change the URL. I started to scratch my head (more then once) when Wordpress would not allow me to edit the URL ....read more

6 11, 2012
  • Cheat Git Commands

Useful Git Commands

Here are some Git commands that you might find useful. Use his command if you want to create a branch from your master-brach git branch [your_branch_name]   On conflict if you want to keep your file use "ours" or use "theirs" to keep the other version: git checkout --ours [file_name] git checkout --theirs [file_name]   ....read more

28 08, 2012
  • Wordpress

WordPress custom search on a category and tag

You might be in a scenario where you are require to produce a custom search result based on a category and tags along with pagination. That is, get all the articles from a specific category that have been tagged with a certain tag value. Here is the code snippet that will do the trick: Here ....read more