Software Engineering in WordPress, PHP, and Backend Development

Category: Articles (Page 95 of 258)

Personal opinions and how-to’s that I’ve written both here and as contributions to other blogs.

Manipulating WP Admin Bar Styles with Events

I’ve mixed feelings about the WordPress admin bar, but that has to do with how third-party solutions add their options to it (plus, it can be disabled if you’re not a big fan of it).

Recently, I published a small plugin – meant primarily for developers – that allows users to toggle admin notices whenever they are working with WordPress (ideally in their local environment, though it can be installed anywhere WordPress is installed).

WP Admin Bar Styles: Toggling with Events

The plugin is simple:

  • It introduces an item into the WP admin bar,
  • When you click on an item, it will toggle any notices or messages that are displayed,
  • When you click on it again, it will toggle their visibility.

But there’s a small nuance that I think is worth covering and that has to do with manipulating the WP admin bar styles using client-side code.

All of this is covered in the initial post, but one aspect of the code that I think is worth sharing for those working with the admin bar and those working with JavaScript.

Continue reading

How Do I Know When to Hire Someone?

Last week, I talked a little bit of how I schedule my time on a per week basis with a team of other people and the whole idea of “less, but better” from Essentialism.

When To Hire Someone: Scheduling Time Plays a Role

Though this isn’t a regurgitation of that post (because that’d be dumb 😇), it is a meant to show one way in which I go about doing that when there are some projects, project management, presentations, and other responsibilities all happening at the same time as I’m writing this post.

So what are we do to when our plate is full of things to do, and we’re not sure how to manage the time and responsibility? Perhaps that’s how we know when to hire someone.

Or maybe not.

Continue reading

Find The Difference in Dates Using PHP (and WordPress)

Working with dates in PHP is one of those things that you either have a good handle on, you’re working on understanding, or you’re stuck in the rabbit hole of the documentation that’s in the manual.

Difference in Dates Using PHP: The PHP Manual

If you’re working with WordPress, though, the chance that you’re going to need to work with dates is quite high. Nearly everything that we publish has at least one date associated with it.

This includes post, pages, custom post types, revisions, drafts, and so on.

Furthermore, there’s a chance that custom work that you need to develop with require that you find the difference in two dates using PHP. And though there are multiple ways of doing this, there’s a process that I’ve been following for something.

Continue reading

Programmatically Create Recurring Events with Event Calendar

Modern Tribe’s Event Calendar is likely the most popular calendar plugin available for WordPress. I’ve talked about querying events using WP_Query in a previous post but that’s applicable to both the free and premium versions.

Programmatically Create Recurring Events with Event Calendar Pro

The premium version offers a lot of great features, but if you’re looking to programmatically manipulate the calendar, it’s a little more difficult to work with it.

  • there isn’t clear documentation on how to take advantage of certain features from a developer’s perspective
  • the places where people have asked how to do so occasionally leave something to be desired.

Case in point: When we need to programmatically create recurring events.

Continue reading

« Older posts Newer posts »

© 2025 Tom McFarlin

Theme by Anders NorenUp ↑