Software Engineering in WordPress, PHP, and Backend Development

Tag: WordPress (Page 126 of 219)

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

Title Capitalization For WordPress 1.1.3

A little over a year ago, I published a small plugin for WordPress to GitHub – Title Capitalization for WordPress.

Title Capitalization For WordPress

The idea behind the plugin is easy:

Properly capitalizes post titles and heading elements in the post content.

Ultimately, it’s meant to make sure that when you enter content – specifically headings – the work will be presented in the best light possible since it will pass through a formatter than properly capitalizes your text and what not based on a set of rules.

Though it hasn’t been updated in sometime, Andy Fragen was kind enough to submit a pull request that I finally got around to merging and to discussing (sorry Andy!) and thought I’d detail it here.

Continue reading

My Opinion on WordPress Change Logs

As far as WordPress-related news is concerned, I think that both Post Status and WP Tavern are two of the best places to get consistent reporting on a variety of topics that range anywhere from things for standard end-users through things with designers and developers.

I’m not really a fan of doing any type of commentary of coverage-of-coverage (so meta, right?), but WP Tavern recently ran an article that I’ve been thinking about since I read it.

Specifically, the article was titled: WordPress Plugin Developers Need to Communicate Better in Change Logs.

 WordPress Plugin Developers Need to Communicate Better in Change Logs

Though there aren’t many, I think reading each of the comments is something worth doing if you haven’t already done so.

Anyway, as far as the general topic of the article is concerned, I couldn’t agree more – both as an end-user and as a developer, and I wanted to share my own thoughts on the topic if for no other reason than to share my own perspective on the topic.

Continue reading

Refactoring Our Code For Google Maps in WordPress

Up to this point, a fair amount of work has been done in terms of introducing Google Maps in WordPress:

  • Twentyfifteen is setup to communicate with the Google Maps API
  • A map is being displayed in a custom template
  • There are two markers that are placed on the map
  • Each marker has its own InfoWindow used to display some information

There’s still more content that could be covered, and I’ll talk about some of the advanced content in another article but, for now, it’s time to refactor some of the code so that it’s more manageable, is organized in more of the “WordPress way,” and lays the foundation to more easily introduce new features.

Namely, all of the work that’s been done up to this point can be moved into a child theme and all of the code that’s been placed in the template can be abstracted out into its own files.

Continue reading

InfoWindows for Google Maps in WordPress

One of the nicest things about the markers in Google Maps is the information that we can get whenever we click on them; however, up until this point, our implementation of Google Maps in WordPress doesn’t display anything when you click on the marker.

For those who have tried, you know it doesn’t actually do anything. But that doesn’t mean it can’t [obviously]. So in this post, I’m going to cover how to create a display whenever the user clicks on a marker on the map.

I’ve covered something like this in a previous post, though it wasn’t done in the context of a series that was aiming to go from end-to-end with an implementation of the Google Maps API so if you’re already familiar with how to do this, then this particular article may not be that useful.

On the other hand, if you’ve been following along since the beginning then this is the next step that we’re going to take.

Continue reading

Google Maps in WordPress: Adding a Marker

In the previous post, we added our first map to the template that we’ve been working on throughout this series.

Through a third-party tool, we ended up getting the latitude and longitude of a city in order to center the map, and though we still have refactoring that we’ll need to do, we successfully displayed the map on the screen.

But part of the lure of using Google Maps is the feature that it offers as it relates to marking certain locations. That is, displaying one of those little red pins that Google Maps shows when you’re browsing for a location, a destination, and so on.

So starting in this article, I’m going to walk through the process of adding up to two markers.

Over the next few articles, I’ll cover how to add multiple markers, and how to do so in a way that’s efficient when it comes to loading up the map on subsequent requests so you’re not exhausting you’re API calls every single time you need to render the map.

Continue reading

« Older posts Newer posts »

© 2025 Tom McFarlin

Theme by Anders NorenUp ↑