Let’s just step back. IF after a code change or addition, something stops displaying completely then that is indicative of a coding error. So it is always vital to ensure that everything is totally correct.
Pasting code into a forum post may look like it is correct but actually the display engine has stripped all coding specific components and replaced them with html entities. If you do not know hat they are then it doesn’t matter. It just means that what might look like good code probably is not if simply copied and pasted.
Ans this is why we use our syntax highlighter plugin to pass code to users as this does ensure that the code is not converted by the display engine.
If you go back to the code I gave you – post 7 I believe – then you will see above it a ‘war code’ button. Click on that and you will get a popup window with the actual, unconverted code, That is what you need to copy into your clipboard before placing it into the new php file. And also you MUST ensure that the editor you use is in plain text mode.
And finally – Ike was wrong I am afraid. You DO need to enclose the code in php tags. Make sure that there are no empty lines either side of the tags. The opening tag must be on l;ine 1 and the closing tag must be on the last line with no empty space below it.
And finally, finally ! – yes – the file just goes into the wp-content folder. It is a special file that we check for that allows people to have a little bit of custom code without having to make a child theme – although child themes are the better and recommended route.
Going to try right now…
