How to Paste Code Snippets into WordPress

This is a short, thought­ful arti­cle writ­ten by the guys at WPBe­gin­ner that explains how to paste code snip­pets into Word­Press that we find around the web. They fix a lot of sites and review the most com­mon errors (the author esti­mates 95%) that can blow up your site. PHP isn’t as for­giv­ing like CSS and HTML can be. Most of the time it’s the actual phys­i­cal place­ment of the PHP snip­pet into the file that causes the error, or the open­ing and clos­ing PHP tags aren’t used at all, or an open­ing PHP tag wasn’t closed with a ?>.

If you’re begin­ning PHP, this arti­cle may very well save you a LOT of time and frustration.

Paste Code Snip­pets into WordPress

wb-beginner screenshot

How to Prop­erly place PHP code snippets