Software Engineering in WordPress, PHP, and Backend Development

Tag: WordPress (Page 140 of 219)

Articles, tips, and resources for WordPress-based development.

Open Source WordPress Themes: Going On GitHub

Over the last year or so, I’ve been hesitant to open source Mayer. I mean, by default, the theme is open source, but I mean placing it on GitHub. Coincidentally, I’ve never had a problem open sourcing any of my plugins no matter how low-quality they were (at least at the time – I mean, I didn’t know any better!).

I still have a lot to learn but that’s a topic for another post.

Anyway, so what’s the rub? That is, why is the only way to grab a copy of the source code of open source WordPress themes to purchase them? It kind of feels a little bit anti-GPL doesn’t it (and to be clear, I do not want to start a debate on this)?

The current GitHub page for Pressware

The current GitHub page for Pressware

But the software should be freely available. It’s the support – and the other perks that come with that – that matters the most, right? And I’ve watched other people be wildly successful with open sourcing their work (Pippin Williamson being one of them). Continue reading

Using WP_Query To Search For a Person

One of the most powerful features of WP_Query is that it allows for us to create a type of mini-search engine within the context of our WordPress projects.

No, this isn’t as sophisticated as something or someone who’s actually in the search business, but you can create some pretty elaborate queries using WP_Query.

Conversely, you can also create some pretty simple queries that do a good job of returning a subset of data. For example, say you’re interesting in using WP_Query to search for a person. There may be a little bit of criteria that the user has to provide, but doing something like this is usually really easy.

Continue reading

Maintainability of WordPress Theme Customizer Code

When working with the WordPress Theme Customizer, one of the things you may find yourself doing is writing out inline styles into one of the templates for your theme. Most likely, this will happen within the context of your header template since that’s where most of your styles and JavaScript sources are included.

Sure, it’s possible to handle a lot of the work via JavaScript and to use separate stylesheets to handle the general styles, but if you’re looking to set something up like, say, backgrounds that can be selected via the Theme Customizer, then you’re going to need to write out inline styles.

And if you’re in the habit of keeping your code separated such as styles reside in CSS files, behavior functionality resides in JavaScript files, and templates hold markup and PHP, then this can be a little bit annoying. It breaks the trend, you know?

There is somewhat of a solution to this, though.

Continue reading

The Shelf Life and Feature Creep of a WordPress Theme

With Mayer about to turn a year old (they grow up so fast), with a healthy backlog of features sitting in the queue, and with two other themes sitting in the planning stage for the first part of this year, I’ve been thinking a bit about WordPress themes as a whole.

Sounds like I have too much free time doesn’t it?

But seriously, one of the things that I do wonder about is how long a WordPress theme can actually be sold and continue to be viable for users especially since design trends change. Additionally, I think that there are times in which a theme has reached the maximum number of features it can justifiably offer before it just begins to feel a bit crowded.

Continue reading

How To Set Cookies in WordPress

Given the state of many modern web applications, one of the things that I think surprises many developers when coming to WordPress is that the application is stateless.

That is, it doesn’t maintain any type of session using the conventional PHP $_SESSION utilities. If you’re building a web application on top of WordPress where users will be required to login, you may want to introduce something like this.

Dark Side of the Cookie

At the very least, you may be interested in using cookies to manage certain settings for users who have signed in on the front-end using some type of custom functionality you’ve built.

To that end, here’s how to set cookies in WordPress.

Continue reading

« Older posts Newer posts »

© 2025 Tom McFarlin

Theme by Anders NorenUp ↑