There are some website owners do not want their URL have www. Like my site I don’t want to have a www in my URL. But there are some cases that Big companies have www in their URL like Facebook and Google This code will help you to remove it. Put this code in your […]
Some of the Search Engines remove the trailing slash from URLs. I know Yahoo does it, but it could result into duplicated content problems when the same page content is accessible under different URLs. Put the following code in your? htaccess. This code makes sure there’s a slash at the end of your URL.
Sometimes we need to remove the File Extension in our URL like .php and .html for a different reason. For me my reason to remove is for security reasons. to do that go in your htaccess file and open it on your favorite text editor. mine is sublime text in this case http://www.yourdomain.com/contact.php will now […]
You can easily center a div by using margin: 0 auto; CSS property when you have its width in your CSS. But in case you wanted to center a div with unknown width you can use this code.
There is a cases that we need to check our URL if there is a word we need on it. To search a URL in a specific word, Use this code. First the $_SERVER[‘REQUEST_URI’] will return the full path of the URL including the query string, in my case I put it on a variable […]
There is now a solution for the equal height when you want to create element in a horizontal position. Instead of using float:left; in your CSS we will only simply add the parent container the text-align:justified; property. and the child that will be in horizontal element will given a display:inline-block; Happy Coding!
To remove the WordPress Meta Tag that can be a security risk in your site. Put this small code in your functions.php
Making title case in PHP is very easy. First lets create a function that we can call every time we need the word to be Title Case or make the First letter in the word Uppercase. Now we will use the function we create.
In WordPress we can add our very own thumbnail size we want so we can use in our customization. Add this code in your favorite functions.php. Using add_image_size function of WordPress. In my case I create a 285×148 size of thumbnail. The first option is the name of image that you can use to call […]
Here is a code you can add in your functions.php in your WordPress template. This code will remove the auto adding of html “p” tag in your content.