Improving or customizing a WordPress blog is all about adding the right piece of code into the right place.
Once you start to modify your functions.php file, please have in mind one simple rule that will save you some stress of going into “blank page with error message.”
Some blogger when sharing WordPress tips wrap their functions with <?php ?>, and some don’t. So, to make things clear:
Option 1
If in your functions.php you see the structure like this:
insert the code without <?php at the beginning and ?> at the end. So it will be something like this pasted on an empty line:
function my_example() { code; }
Option 2
If you see the structure of your functions.php like this:
insert the code with <?php at the beginning and ?> at the end. As you see, the function can be wrapped in <?php ?> in different ways, and each one is correct.
In this option you should wrap your code with <?php ?> as well, so it will look like this:
• • •
More on WordPress:
[pi-archive number=5 tag=”wordpress” ]