Software Engineering in WordPress, PHP, and Backend Development

Tag: WordPress (Page 121 of 219)

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

WordPress and Theme-Specific Plugins

When it comes to working with WordPress themes and plugins, there’s a general rule of thumb that most experienced designers and developers follow:

Themes are for presentation, plugins are for functionality.

Sure, there’s a little bit of blurring of lines, but this is the goal for which we strive when working through our code. And yes, there’s a lot that can be said (and has been said) about themes that include a ton of features, options, bundled plugins, and so on, but that’s not where this is going.

WordPress Themes

Instead, I’ve been thinking about how this relates to general theme development, niche theme development, and using WordPress as a platform for application development.

Continue reading

Two Tips for Writing WordPress Plugins

Occasionally, I’m asked for two quick tips or suggestions that I have for those who are just getting started with writing WordPress plugins.

WordPress Plugins

The assumption is that they’ve done all of the necessary leg work to get to the point where they are comfortable writing code and working with WordPress, but they want to avoid some of the pitfalls that many (or most?) of us experience when we first get started on our own projects.

Continue reading

Why I Recommend Array Themes

The WordPress theme market is at a weird place right now. Simply put, a lot of people will state the themes have now become a commodity. Sometimes, people consider this a bad thing, others consider it a more of a neutral fact that’s more or less a representation of where the WordPress economy currently sits.

Regardless of what your perspective may be, people still want to blog, people still need to have good-looking, functional websites, and people still need to have reputable places from which to purchase their themes.

And that’s why I dig (and recommend) Array Themes.

Continue reading

TinyMCE and WordPress: Adding User Input

In the previous post in this series, I showed how to add content to the post editor using a custom TinyMCE button. The problem with the approach, as we’ve covered thus far, is that the content that we’re adding to the editor is hard-coded.

We’re rarely going to want to be doing this, right? I mean, wouldn’t we rather grab input from the user and then add that to the editor?

My very own copy TinyMCE Editor. Show spectacular.

My very own copy TinyMCE Editor. So spectacular.

For some, this may be creating a shortcode based on some input, for others it may be grabbing input, making an Ajax call, and then putting the result of the request into the editor, or it may be something as simple as taking whatever input the user has provided in a prompt and then adding it to the editor.

Though the latter case is not likely something that is a realistic use case (after all, if they just wanted to put something into the editor, why not just, you know, enter it into the editor?), it’s something that will make rounding out this series a bit more complete because it will show how to connect displaying a prompt to the user, grabbing the input, then using the TinyMCE API to drop the input into the editor.

So that’s what we’ll do.

Continue reading

Get The Post Type of the Current Post with JavaScript

Whenever you need to get the post type for a given post, there are a couple of ways to do this:

  • If you’re in the dashboard, then you can use `get_current_screen()` and then access the `id` property of the object that’s returned. You can read more about this in the Codex.
  • If you’re on the front-end (or even in the dashboard, really), you can use `get_post_type`. This is also covered in the Codex.

But what if you want to grab the post type of the post that’s currently being edited on the client-side (read: via JavaScript)?

Continue reading

« Older posts Newer posts »

© 2025 Tom McFarlin

Theme by Anders NorenUp ↑