Posted on February 10th, 2017 in Technical: Code snippets, PHP, WordPress
If you haven’t spent time looking at WordPress starter/default themes, you may not have come across the body_class function before. It can be useful right out of the box for styling different types of content, but you can also conditionally add classes to this list for further styling.
Continue reading “Function Friday #4: add conditional classes to the body tag” →
Posted on February 3rd, 2017 in Technical: Code snippets, PHP, WordPress
The second row of formatting buttons in the Visual Editor contains some useful ones, but it’s hidden by default. I don’t feel the couple pixels of space saved are worth potentially missing out on the added functionality, so I like to display the second row for all users.
Continue reading “Function Friday #3: always show a second row of buttons in the Visual Editor” →
Posted on January 27th, 2017 in Technical: Code snippets, PHP, WordPress
This code snippet will let you apply custom styles from your theme with the click of a button. You could switch to the Text (HTML) Editor and add classes manually, but it’s easy to forget the option exists if you have to edit the code every time.
Continue reading “Function Friday #2: custom typography styles in the Visual Editor” →
Posted on January 20th, 2017 in Technical: Code snippets, PHP, WordPress
After I’ve launched a WordPress site for a client, I don’t want them to have to contact me to make any updates. To that end, I try to build in as many customization options for them as possible. One quick one is to show their brand/theme colours in the “Text color” colour picker instead of the default palette.
Continue reading “Function Friday #1: custom colour palettes in the Visual Editor” →
Posted on January 13th, 2017 in Technical: Code snippets, PHP, WordPress
Every Friday in 2017, I’ll share a neat code snippet for WordPress development. Before kicking it off, though, I wanted to do a little breakdown of where this code should actually go!
Continue reading “Function Friday #0: functionality plugins vs. the functions file” →