Every week I try to sit down and update some of my old WordPress functions, to ensure they meet the latest WordPress coding standards and are in keeping with the best practices. If you ever find a piece of code on thisismyurl (or in any of my plugins) that you feel can be improved, please feel free to fork the code or send me suggestions! In the mean time, here’s what I fixed this week:
Getting WordPress Content Outside the Loop
This function allows you to fetch the_content() without being in a loop.
Generate Tags for Posts without Tags
Tags are useful for a lot more than just SEO, and this little function loops through your posts (25 at a time) to ensure all your posts have tags associated with them. I use it on newspaper websites but it can be used on all WordPress sites well.
Get a quote from a directory
This is an old snippet, and after learning as much as I have I’d likely never code a site like this again but it’s still an interesting concept that can be easily adapted to load images or text for a specific day.
Remember, if you’re not comfortable adding this code to your WordPress theme function.php file, you can also create a site specific plugin for your site.


WordPress allows you to bulk edit posts by selecting either all the posts in the current list (the check box beside the word Title) or by selecting the checkbox beside each post you want to affect. You can also adjust the number of posts shown at a time under the Screen Options in the upper right corner of your admin interface.
The first (and easiest) way to remove comments from your WordPress website is to simply hide them. This means that technically they’ll still be there but nobody will be able to see them.