Programming-3

How to easily enable/disable debug mode in WordPress

WordPress comes with a debug mode by which you will be able to grab the information which lets you know that what is wrong. In order to enable or disable the mode, all you have to do is to copy and paste the following snippet in your theme’s wp-config.php file.

Once done, simply add a GET parameter to the url of the page you’d like to debug:

Snippet Source/Credit: Joost de Valk

How To Get Rid Of HTML In Comments

People often put their HTML links in the comments in an urge to get a link back. Well, this sounds frustrating mainly for the website owner but not the people who perform such task. Well, if you wish to get rid of HTML in comments completely, then all you have to do is to copy and paste the snippet in their theme’s functions.php file.

Snippet Source/Credit: TheBlog.ca

How to make term edition easier

While WordPress does come with much in-built functionality but sometimes you require more, say like quick edition of a term (mainly category, tag or custom term). In order to achieve the above, all you have to do is to simply paste the following snippet in your theme’s functions.php file.

Once saved, add the following line of snippet on any category, tag or taxonomy template:

Snippet Source/Credit: Joost de Valk

How To Rearrange WordPress Categories Order

Adding the following snippet to your theme’s functions.php file, you will be able to rearrange WordPress categories order, completely the way you want it.

Snippet Source/Credit: Sebastian

How to set a maximum word count on post titles

Adding the following snippet to your theme’s functions.php file, you will be able to set a maximum word count on post titles.

Snippet Source/Credit: Pippin

How To Use WordPress Shortcodes In Theme Files

A person who has got even a little knowledge of WordPress does understand the importance of WordPress shortcodes. While, everyone who are aware of shortcodes, definitely love them out but unluckily, shortcodes by default can be use only in post and page editor area and not in theme files. But, well with the help of this snippet below, you can use a shortcode in a theme file too, all you have to do is to use the do_shortcode() function as shared below.