Life in Code
Welcome to my personal space on the web where you can get an insight into my own business journey, my interest in weightlifting and personal training and course, code snippets and development discoveries I have made along the way.
A simple helper function that I use in most WordPress websites to output a short description or summary of a post. This will use the post excerpt content in full if it has been defined for the post, or return… Read more
My freelance journey started at age 35. I didn't have a long term plan to go freelance, in fact it all happened very quickly. By very quickly, I mean that I was looking to move on from my employed role… Read more
The following code will only return authors of a specific role from the generated Yoast XML sitemap. In the example, users of the 'editor' role are returned. Add the following to your functions.php file: /** * Filter Yoast authors -… Read more
There may be times when you need to add to the WHERE clause within a WP_Query call for additional SQL filtering that cannot easily be achieved via the standard parameters. The following is a simple example that passes through a… Read more