Simplify conditionals using arrays using PHP/JS Simplify conditionals by checking against an array instead of variables individually #javascript #php
Easily add a table of contents to any post without a plugin in WordPress I had to build some table of contents functionality recently, and after trying numerous very popular plugins, I decided to create my own solution that by far offers the most flexibility and versatility. Read on to see my solution. #wordpress #php
Interpolating variables and multiline markup in PHP Various methods on writing and returning variables within markup in PHP #php #html
One does not simply echo in WordPress Displaying data in WordPress often involves more than just echoing. I mean, echo will work and display output just fine, but if you want to make sure your code is as secure as possible, it's always a good idea to attempt to clean whatever data you are using first. #wordpress #php
Using a single PHP loop to output data into multiple wrapping elements Ever run into the problem of needing to output data from a PHP loop into separate wrapping divs? You could use the same loop twice to return data into two different divs. Or you could use this is a super handy technique to generate data *inside* multiple different elements using the same loop. #php #wordpress #methods