Need Directions? Here’s How to Add Maps to WordPress

There are many reasons why you might want to add a map to your WordPress site. Do you have a shop and want to display your location? Or maybe you’re into real estate and need to show your latest listings. Whatever the reason, adding a map to WordPress is easy to do.

Like a good map, we’ll guide you through how to do it. You can add a Google Map manually or create one with the help of a plugin.

First, I’ll show you the costs of getting a Google API and how to obtain one. Most of the Google map plugins I’ll be covering in this tutorial require a Google API.

Next, I’ll show you how to get the embed code directly from Google Maps without a plugin.

And finally, I’ll be going through 12 plugins that can fit the bill. Each one is a bit different. Some of the features may be more appealing to you than others.

All of the plugins are free to activate and use, but some offer upgrade options for even more advancements.

Dev Man mapping out his next plugin.

Now that we have this article mapped-out, let’s begin…

Must I Buy an API?

Don’t worry. Chances are it won’t cost you anything. But, it’s worth going over this in case you want to use Google Maps with a plugin.

Having an API key has been a requirement for Google Maps since June 11, 2018. You can see in their pricing table below what that looks like when you obtain one.

Google API pricing.
The Google API costs vary by use.

One thing Google does is gives you a recurring $200 credit on your billing account each month. That offsets your usage costs, so unless you’re making quite a few requests (like, a ton), using Google Maps shouldn’t cost you a dime. Whew!

So now that you’re not freaked out about the costs, let’s…

Get a Google Maps API Key

You’ll need to go to the Google Cloud Platform Console and create an account.

From that point, you need to select or create a project. It walks you through on setting one up or just pick from a project that’s already available.

You’ll have to set up billing information – but again – don’t freak out. You won’t have to worry too much about being billed, though, unless you go past the threshold of high usage limits. If you do, you’ll get charged accordingly.

After your billing information is entered, it will now ask you to pick one or more products.

Google's map options.
Google gives you quite a few map options.

Your choice will vary depending on what type of map you’ll be using. Since we’ll be going over how to embed a map without a plugin next, we’ll go with the Maps Embed API.

The embedded map option.
Want an embedded map? Go with this option.

From here, you’ll click Enable.

Where you'll enable Google maps.
Enabling the map is one click away.

Enable will take you to the APIs & Services dashboard.

Here is where you create your API key. Click on Credentials and then Create Credentials.

Where you'll create the credentials.
All of your API keys will be displayed on the dashboard once created, so you can retrieve them at any time.

Like that, you have created an API key. You’ll need the API key for many of the plugins that we’ll be going over.

Something to keep in mind is that it will show in plain text in your source code when embedding your Google Maps API key. You’ll want to restrict this so that people can’t use your API key on their WordPress sites. That can cause your usage to skyrocket if it gets in the wrong hands.

Doing this is easy. You’ll just click on your API key’s name to set up restrictions. Simply adding your WordPress site referrer should do the trick (e.g. https://yourdomain.com/). By doing this, it will restrict usage to just your site.

We'll you'll add website restrictions.
Enter the website that you will be using this key for.

Now you’re ready to use any plugin that requires a Google API. So, let’s go ahead and look at…

Embedding a Google Map into WordPress

If you feel like going plugin-free and just adding a map by embedding it from Google Maps, that’s easy to do.

Google can also add a precise location for whatever you want to display, show detailed information about a business, and more.

To demonstrate how it works, we’ll just set up a basic map of Los Angeles, California (hey, my neck of the woods!) to embed.

We’ll just head over to Google Maps and pull up the Los Angeles area. Zoom in or get as close to the location as you wish.

Map of Los Angeles, California.
Los Angeles is a pretty big place…

You’ll then click on the three little lines in the upper left corner. This provides you with a dropdown. From this point, you’ll click on Share or embed map.

Where to embed map.
Have the map sized the way you want? Click on Share or embed map.

Once you do that, you’ll have options to send a link or embed a map. Plus, you can choose what size you’d like the map to be (e.g. medium).

The map embed code.
You can determine various sizes for the map that suits your site best.

From here, you’ll simply copy and paste the HTML in your WordPress post, page, or acceptable widget, and that’s it! Your map will be displayed.

12 Map Plugins for WordPress

Let’s say you want to do much more with your map, other than just what Google Maps provides. You want some options, dammit! Well, that’s where plugins can help.

Here’s a look at 12 map plugins that might be beneficial to tweak your map to your standards.

  • MapPress Maps for WordPress

    For attractive looking interactive Google or Leaflet maps, the Mapress Maps plugin is a great free option.

    It features multisite compatibility, markers that can be drag & drop, and is street view supported. Plus, you can set many parameters, such as width, height, zoom, and more.

    If you upgrade to their Pro version, you get additional functionality, such as custom icons, mashup options, and a map widget to show a map or a mashup.

    Interested in MapPress Maps for WordPress?

  • WP Google Maps

    As the name suggests, WP Google Maps is for Google maps that you can add to your WordPress posts and pages quickly and easily with a shortcode. This is the most popular Google Maps plugin out there, with over 400K active installations.

    You can create as many maps as you’d like by typing in the address. It also has nine popular map themes to choose from, drag map markers, fullscreen map functionality, etc.

    You can upgrade to the Pro version if you’d like to create maps that give your visitors directions and add categories and other advanced features.

  • Maps Widgets for Google Maps

    The Maps Widgets for Google Maps allows you to have a map with a thumbnail & lightbox set up in a matter of minutes. It can load the entire Google map in only one request rather than the twenty-some requests that many other Google maps plugins take to load them.

    Some of the features are custom Google map sizes, map types (e.g. road map), color schemes, and custom map pin icon.

    With a solid 4.5-star review and over 80K active installations, it’s a free option that’s worth setting up on your WordPress site to try out for yourself.

    Interested in Maps Widgets for Google Maps?

  • Ultimate Maps by Supsystic

    If you’d like to use something beyond Google maps, the Supsystic Ultimate Maps plugin might be perfect for you. It uses alternative map options, such as Bing Maps, OpenStreetMap, Leaflet, Mapbox, and Thunderforest.

    It features a map builder and unlimited markers with description, links, images, videos, and more. It’s also fully responsive and 100% customizable.

    The ease of use and map options beyond Google make this 5-star rated plugin an option to check out.

    Interested in Ultimate Maps by Supsystic?

  • WP Mapbox GL JS Maps

    To create custom maps, the WP Mapbox GL JS Maps plugin might be all you need. The plugin makes use of Mapbox services that include Studio Styles and the Mapbox GL JS library.

    Some of the features include a live preview editor, unlimited markers by address or drag and drop, and location search.

    When it comes to style, there are over 100 icons with different colors available, 3D map shapes, ten styles to choose from, and more.

    There are also tutorials and support from the Mapbox GL JS experts.

    Interested in WP Mapbox GL JS Maps?

  • Leaflet Map

    The Leaflet Map plugin works by generating a map with LeafletJS, which is an opensource JavaScript library for mobile-friendly interactive maps.

    This plugin uses a shortcode to create maps, look up addresses, the longitude and latitude, and more.

    It’s a very basic plugin, but with a 5-star review, it seems to do the trick for many users.

  • Interactive Geo Maps

    The Interactive Geo Maps plugin is great if you want to add an interactive map to your WordPress site. There are over 250 maps available with regions and colored markers.

    This plugin works great for travel bloggers, office locations, statistics, and more.

    The Interactive Geo Maps are free for the limited version. If you’d like to upgrade to include custom images and vector icons, you can upgrade to the Pro version.

    Interested in Interactive Geo Maps?

  • Google Maps Easy

    Want to set up a map quickly and easily? Google Maps Easy has you covered. You can have a Google Map set up in a minute.

    It features Google Map markers with any media. That includes video, images, links, and text descriptions.

    It’s great for real estate, contact pages, delivery routes, and more.

    This plugin is also 100% customizable, fully responsive, and can use an unlimited number of map markers & locations.

  • WP Store Locator

    The WP Store Locator plugin is an easy to map plugin for – you guessed it – store locations. You’ll be able to pinpoint your location to customers and send them the right way.

    The plugin allows you to customize the map’s appearance, provide custom labels for entry fields, and users can filter the results by radius. There are also driving directions to nearby stores.

    The number of stores you can add is unlimited. Plus, you can include details, such as phone number, email, URL, descriptions, hours of operation, etc.

  • WP Google Map

    With the WP Google Map plugin, you can add a custom Google map to your WordPress site. It’s totally customizable and free.

    There is no coding required, and adjustments are easy to make. You can change the width, zoom levels, and add a shortcode to an acceptable widget.

  • Flexible Map

    With Flexible Map, you can add Google Maps to your WordPress website easily with shortcodes.

    Some of the features include optional descriptions and directions. You can also load a map by center coordinates, street address, and URL to a Google Earth KML file.

  • Stellar Places

    A newer plugin is the Stellar Places. It’s designed for creating, managing, and displaying locations using Google Maps.

    When you have a new place added, you can access the listing view and single location view. Both options automatically have maps associated with them. It also features a live map view, drag & drop marker relocation, unlimited locations & maps, and clean, well-written code that won’t bog down your WordPress site.

    A significant difference between the Stellar Places plugin and many other plugins is that it uses custom post types to manage locations. Plus, most don’t have an intuitive interface.

That’s a Wrap When it Comes to a Map

From getting an API key to creating awesome maps with a plugin, you should be able to add a map to your WordPress site in a snap.

It really depends on your purpose for displaying a map to determine what route works best for you. The options, customization, and usability come in many different forms.

I hope this article has helped you map out a few ideas. Just follow the directions above and you’ll be good to go.

5 Pitfalls of WooCommerce Subscription Sites

Pitfalls of WooCommerce Subscription SitesSubscription-based websites are on the rise, thanks to the ever-enticing perspective of passive income. Thankfully, WordPress and WooCommerce make it easy to set up a paid subscription site. However, you can’t let the ball drop once the site is set up. WooCommerce subscription sites have some unique challenges in terms of customer support, development changes, […]

The post 5 Pitfalls of WooCommerce Subscription Sites appeared first on WPExplorer.

5 Best Techniques for Automated Testing

New technologies and techniques are shaping the future at the same pace. The fast technological advancements in the software development and software testing industry strike the testers to improve their skills analytically. As per Gartner, Multi experience is going to be the app development upcoming future.  Companies are now determined on releasing their products on multiple series of gadgets counting augmented reality (AR), AI, and wearables, thus allowing the users to experience the products in distinct ways. 

Even in a new survey, 84% of participants stated that they think the implementation of Artificial Intelligence can provide them with a competitive advantage over competitors. It has become crucial for the software testing firms to think about the most effective software testing techniques to accomplish the expected quality.

How To Install TestNG In Eclipse: Step By Step Guide

As you already know, TestNG or Test Next Generation is one of the most frequently used automation testing frameworks in Java. Inspired by JUnit and NUnit, Cedric Beust created TestNG with the idea of covering almost all types of testing models, be it functional or end-to-end. The annotations, functionalities, usability, features, and ease-of-use make TestNG a very popular choice of framework. Listed below are some of the major benefits of using TestNG-

  • The reporting feature provides a detailed XML report of every successful, failed, or skipped test.

See How Edge Analytics Complements Cloud Computing To Design Better Industrial Solutions

Connected applications and systems are moving to the cloud with the implementation of IoT. Parallelly, the number of end-devices and their data generated on the cloud is also increasing. Sensors, mobile devices, wearable, and many other connected devices in the IoT ecosystem generate a huge amount of decentralized data. Lack of reliable connectivity, delays, and difficulties in processing this huge data on the cloud, raised a challenge in analyzing and extracting important insights from this data.

To overcome this challenge, enterprises are leveraging edge analytics along with cloud computing. This will bring instability in the IoT network by bringing the computational power near to the data source and will reduce the delays in analytics, resulting in instantaneous vision and resolutions. Edge analytics brings algorithms to the data and provide important insights.

E2E Test — Use Probe Attribute As Element Locator

If you have experiences to create an E2E test project on a web application, you should be familiar with codes like this.

JavaScript
 




xxxxxxxxxx
1


 
1
// Manipulate browser to enter text to an input box
2
    const fooInput = await getElement('.fooInput');
3
    fooInput.type("user.name@email.com");
4

          
5
    // Manipulate browser to click the submit button
6
    const fooButton = await getElement('button[type=sybmit]');
7
    fooButton.click();
8

          
9
    // Then verify what is happening after form submit



How to Do API Testing?

Nowadays API testing is an integral part of testing. There are a lot of tools like postman, insomnia, etc. There are many articles that ask what is API, What is API testing, but the problem is How to do API testing? What I need to validate.

Note: In this article, I am going to use postman assertions for all the examples since it is the most popular tool. But this article is not intended only for the postman tool. 

7 Ways To Apply Artificial Intelligence To Your Website

In recent years we are seeing a great boom in artificial intelligence. Due to the boom in deep learning, we now have more robust and more general predictive models, being able to face problems that were previously unthinkable. 

Self-driving cars, virtual assistants, or new text translators are just some of the examples of the applications that artificial intelligence has today. However, artificial intelligence can be applied to solve practically any problem that arises. 

DevOps Automation: How to Apply Automation Into Your Software Delivery Process

It seems that nowadays, DevOps can mean many different things. As a DevOps expert at OutSystems, whenever I’m asked what this practice is all about, I like to say that it’s a way to deliver value faster to your end-users. More than a skill, a job role, or a tool, DevOps is a culture-shifting paradigm.

It’s about speeding up the flow of delivering software changes to your production environments and amplifying the feedback loops in your delivery pipeline so that you can catch problems early on during your development stage and act upon them quickly. This is why you always see practices like CI/CD and test automation closely associated with DevOps.

Most Practical Selenium WebDriver Tutorial With Examples

Selenium is one of the most widely used automation frameworks for web-application testing. It automates browser testing and eases redundant test efforts for the QA Community. Most of the organizations are switching to using Selenium to automate their test suites which are often run regularly. Selenium WebDriver is a pivotal component of the Selenium suite. This is a Selenium WebDriver Tutorial to help you understand what is Selenium WebDriver and how it came into existence. We will also gaze upon the Selenium WebDriver architecture and run automation testing with Selenium WebDriver.

Before we deep dive into this Selenium WebDriver tutorial, we will need to understand what is Selenium and what are Selenium components.

More Power in the Hands of WordPress Support Forum Users

What level of control should users have over their WordPress support forum topics? That is the question at the heart of a recent discussion opened by Mika Epstein on the Make Support blog. The goal is to grant more power to users, particularly when they post private or privileged information to the public forums.

The proposal is twofold. One idea is to give users total control over deleting or “archiving” topics they create. This would remove it from public view at least. The second part of the equation would extend the amount of time users have to edit their topics.

Currently, users can edit topics for one hour after posting. For the most part, this is reasonable. However, there are some cases where users inadvertently post sensitive data and need to remove it later. After their hour is up, the only solution for editing is to contact a forum moderator, increasing the burden on the WordPress support team. The easiest solution is to increase the length of time to edit.

The big downside to editing topics is that they can be changed so much that replies are out of context. This can make discussions, particularly, lengthier ones with more replies, hard to follow. However, given the nature of the WordPress forums being for support instead of long-form discussion, increasing the time-to-edit should not hurt. It should help users fix mistakes and lighten the load on forum moderators. There are proposals for increasing the limit between three to seven days.

In general, I am supportive of increasing the time-to-edit for forum topics. There is some room for abuse of the system, but such abuse will not likely outweigh the benefits. However, the ability to delete a topic does not sit well with me.

I see the problem. WordPress’s user base has changed over the past decade. The average user from 10 years ago was tech-savvy enough to not drop private info — or info they are not legally allowed to share — into public forums. The game has changed. Users are no longer webmasters, running every aspect of their sites. They are using one-click installs to launch software they have no technical knowledge of. They do not know the difference between a debug log and server info. This is not a bad thing — the more WordPress users the more we inch toward that democratize-publishing goal. However, the makeup of WordPress’s users has shifted drastically to a point where many may not realize they are posting information they shouldn’t.

The burden ultimately falls on forum moderators. They do all the cleanup, and it is likely overwhelming at times to keep up. It is a decision that should probably fall into their hands.

One of the catalysts for this discussion was a forum topic from last week. “Someone had posted information that isn’t exactly ‘private’ but could land them in legal trouble for sharing,” wrote Epstein. “They did so by posting a debug log that had information that probably should not be public.”

The WordPress support system has had a long-standing, in-house rule of not deleting posts except under extreme circumstances. However, the proposal would allow users to delete their own topics at any time.

I dislike the idea of removing support forum topics. The best form of support is to already have a question answered. This gives others the ability to search and find the answer to their own questions. It allows moderators to link to existing answers for repeat questions. Allowing users to remove topics means that others could miss out on free knowledge.

I ran a plugin and theme support forum for over a decade. It racked up hundreds of thousands of posts. I personally answered every question or made sure that each was answered by someone else. Over the years, the forums became a wealth of knowledge because, except in those extreme circumstances, no topic was ever deleted. Granted, my support burden was far lighter than that of the WordPress support moderators. However, past forum topics were an important tool in the arsenal.

Moreso than my time running support, I have relied on past support forum topics for my edification throughout the years. Rarely has there been a time I have needed an answer that I could not find through a basic support search. No need to hassle others with my already-answered questions.

I dislike the idea of deleting knowledge.

Of course, we must weigh this against privacy. I doubt many users would take advantage of the ability to delete their topics. In those rare cases when they do, I imagine they will have a good reason for doing so, such as hiding information they no longer want to share publicly. Still, the idea does not sit well with me. I want a balance of retaining knowledge while removing personal data.

I do have respect for privacy. There are steps WordPress.org could take. Users should absolutely be able to remove their own accounts from WordPress.org. Currently, they can remove any personal data from their profile, which is essentially the same thing. The one problem with this is if their username, which cannot be changed, identifies the person (e.g., I use justintadlock for many online accounts).

I would still take this the extra step and allow users to completely delete their accounts. This would be a clean sweep, ensuring they did not accidentally miss something when clearing out their profile. After doing so, their former topics in the forums should simply be assigned to an anonymous account. It doesn’t matter who created a particular topic, only that the content still exists.

What steps do you think WordPress.org should take to provide end-users more agency over their support topics?

AVIF has landed

Everybody is talking about AVIF today because of Jake’s blog post. As the say, I was today years old when I learned AVIF was a thing. But thanks to web technology being ahead of the game for once, we can already take advantage of it.

This will be easier if you’ve abstracted your responsive images syntax. Wherever you’re using <picture> you can slip it in such that supporting browsers get it and non-supporting do not:

<picture>
  <!-- use if possible -->
  <source type="image/avif" srcset="snow.avif">

  <!-- fallback -->
  <img alt="Hut in the snow" src="snow.jpg">
</picture>

Wanna play with it right now? Jake updated Squoosh to support it. CodePen also supports it. Here’s a Pen (I forked off Shaw’s original):

Check out the Pug HTML there to flop out other sources. If the URL to the image you put it is hosted on CodePen’s Asset Hosting, it will do all the conversions and such automatically. The images go through a Cloudflare Worker which is what does the conversions, and supports AVIF. For new images, you might feel the response time lag on that first request for AVIF before it is cached, seems like generating them takes a lot more work.

Like any format, it really depends on the type of image it is. While screwing around, I put an already-compressed JPG as the source, and AVIF more than doubled the size of it’s version. So you’ll have to be careful that you aren’t making things slower by using it.

We’ve had it good with new image formats so far. WebP is nearly always the best format so much of the logic has gone down the if (webp_supported) { use_webp } road. But now, not only is AVIF only sometimes smaller, the way it does compression leads to different visual results, so even when it is smaller, you might not be happy with the look.

My ideal scenario is always some kind of image CDN with ?format=auto&quality=auto where it picks the best possible format and quality automatically, never making it worse than the original. But then also having overrides possible so if you aren’t happy with an automatic decision, you can fix it. I was going to test Cloudinary’s auto-formatting choices, but they aren’t supporting it yet. I’d bet they will soon, but I also bet it’s darn complicated to get right.

Direct Link to ArticlePermalink


The post AVIF has landed appeared first on CSS-Tricks.

You can support CSS-Tricks by being an MVP Supporter.

High Availability Router/Firewall Using OpenBSD, CARP, pfsync, and ifstated

Introduction

I have been running OpenBSD on a Soekris net5501 for my router/firewall since early 2012. Because I run a multitude of services on this system (more on that later), the meager 500Mhz AMD Geode + 512MB SDRAM was starting to get a little sluggish while trying to do anything via the terminal. Despite the perceived performance hit during interactive SSH sessions, it still supported a full 100Mbit connection with NAT, so I wasn’t overly eager to change anything. Luckily though, my ISP increased the bandwidth available on my plan tier to 150Mbit+. Unfortunately, the Soekris only contained 4xVIA Rhine Fast Ethernet. So now, I was using a slow system and wasting money by not being able to fully utilize my connection.

Naturally, I looked back to Soekris for an upgrade that would allow me to take advantage of this new speed since it served me so well for so long, but I soon discovered that Soekris stopped innovating and closed US operations a few years ago. After widening the search, I decided to try the PC Engines APU4C4. This included a 4 Core 1Ghz AMD GX-412TC CPU, 4GB of DDR3-1333 DRAM and 4xIntel PRO/1000 Gigabit Ethernet. A huge improvement.