Software Engineering in WordPress, PHP, and Backend Development

Category: Notes (Page 30 of 50)

Notes on programming-related problems that I’ve encountered while working on various projects.

Add a Custom Wrapper To The WordPress More Tag

Most of the popular CSS frameworks that are available today offer some sort of grid system for us to use such that we can arrange our content in rows and columns. This is advantageous for a number of reasons, the least of which is not for aiding responsive design.

When it comes to WordPress, one of the most common elements that authors will use is the `more` tag.

Just as there are times where we may want to indicate that a class has (or doesn’t have) a `more` tag, we may also want to wrap the tag in a row with columns on either side of the tag.

This gives us flexibility in styling the tag not only by helping to place the text by using columns and/or offsets, but also by taking advantage of a grid in the context of responsive design.

Continue reading

Happy Thanksgiving!

Today is an official holiday in the United States, so I’m taking the day off of the usual routine.

For those of you who are in the United States and are celebrating Thanksgiving, I hope you guys have an awesome day hanging out with your family, friends, eating, sleeping, and generally enjoying the day off.

Happy Thanksgiving 2013!

Happy Thanksgiving, guys!

Continue reading

Add a Post Class in WordPress: The More Tag

WordPress’ `post_class` function makes it really easy to write out a variety of class names to post containers that give us a finer-level of control when working on styling WordPress posts.

But there are times in which you may want to actually add a custom class to a post (or to a single post) depending on the nature of the content of the most.

And sure, you can easily add additional parameters to the `post_class` function, but those are still static parameters that will be applied to every posts.

What about in cases where you want to add a class if, say, no more tag is present in the content?

Continue reading

How To Setup a Custom Grunt Task For WordPress

Now that WordPress 3.8 is in development, now is a good time to look into contributing a patch.

But seriously, if you’re looking into contributing to the codebase, then it’s important to be familiar with two things:

Once you’ve gotten those two things setup, you can actually setup customized Grunt tasks (via your own options) that will help test the work that you’re doing without kicking off the entire process, a part of the process, or testing individual files.

Continue reading

Setting Up Grunt For WordPress

With the WordPress 3.8 development cycle underway, I thought it might be worth sharing how you can go about setting up Grunt for WordPress development on your local machine.

The reason for this is because WordPress is now using Grunt, JSHint, and a number of other utilities to help automate tasks, and if you’re looking to contribute to certain parts (not all, mind you) core, then these are the tools that you’re going to need – especially if you’re working on any tickets under the Build Tools component.

Continue reading

« Older posts Newer posts »

© 2025 Tom McFarlin

Theme by Anders NorenUp ↑