4 Ways You Can Start Using the WordPress REST API Right Now

The REST API is finally integrated into WordPress’ core, yet so many developers seem to be at a loss for how to use it in their real world projects. We get it – interacting with APIs can be an intimidating step!

However, the REST API opens up a world of opportunity for developers of all skill levels. By offering API access to the WordPress infrastructure, anyone can build an application using that data. You can take advantage of this by incorporating it into your themes, plugins, and even implement completely unique integrations.

In this article, we’ll discuss why the REST API is a game changer, then explore four ways you can use the REST API in your own projects. Let’s get started!

Why the REST API Is Such a Disruptive Feature

The REST API is a game changer because it transforms WordPress from a Content Management System (CMS) into a data framework. In other words, WordPress now extends its impressive content management features into application-agnostic data management.

The concept of a ‘headless CMS’ has grown in popularity recently due to its versatility. The term “headless” here means that the visual user interface for managing data is decoupled from the logical side of the data management process. The structure gets maintained using a central API, which can then be hooked up to almost any front end interface you can dream of.

The REST API enables WordPress to become a headless CMS by offering multiple access points to one central data source. This means you can build native phone, web, and desktop apps that all rely on the central API of the core WordPress installation.

Of course, if you already have an existing project, it may not make sense to start from scratch. However, you can still take small steps to incorporate the REST API into your projects. Let’s explore four of those options now.

4 Ways You Can Start Using the REST API Right Now

Whether you’re working with a new idea or building on top of an existing site, there is always room for innovation. Here are four ways you can extend the functionality of your WordPress site using the REST API, starting right now!

1. Build a Decoupled Front End Interface

Building a decoupled front end interface using WordPress simply means taking advantage of its ability to be a headless CMS. In short, you can choose to build almost any front end application, and interact with WordPress using the REST API.

This comes in handy if you’re interested in building app-like sites. For example, you could build a web application using React.js, then extend it into a native mobile app using React Native. This cuts down on the code base and effort of managing multiple user interfaces. Instead of needing to completely rebuild your app for web, Android, and iOS, you’ll employ extra code to make your web app ready for Android and iOS.

React.js Library
React – a JavaScript library for building user interfaces.

There are a few essential steps to building a decoupled front-end interface:

  1. Have a main installation of WordPress available live on a server.
  2. Choose a front end development tool that can connect to the WordPress REST API, such as React.js.
  3. Build your front end interface using the REST API, customizing it to suit your needs.

As for actually tackling the project, there are plenty of quality tutorials available to create a native mobile app with the WordPress REST API, and we’ve also previously looked at building a regular React.js app using the REST API too.

2. Syndicate Content From Multiple Sites

The REST API provides an easy way to access public data, and syndicating content from multiple sites to one place can be simple. For example, let’s say you run a company with many branches such as a bank or fast food franchise, and each location runs its own WordPress site. Your central corporate site could use the REST API to syndicate those blogs into one feed on your main site, providing a hub to keep your readers updated on all locations.

For another example, Washington State University has 1083 sites across 54 networks running on a single installation of WordPress. That sounds like an insane amount of content to keep track of! Of course, it would be if not for the REST API.


Washington State University syndicates all of their site’s content using the REST API.

They even created an open-source plugin – WSUWP Content Syndicate – that enables anyone to syndicate content from their plethora of sites on a completely unique WordPress installation.

To get started down this path, we recommend reading more about the benefits of syndicating content using the REST API, then using the WSUWP Content Syndicate plugin as a starting point for building your own.

3. Synchronize Content Between Sites

With proper authentication, you can use the REST API to manage private back end content, too – think of a newspaper or magazine website. They may set up a staging WordPress site to hash out content ideas. This is where all of the messy stuff goes: ideas are submitted and organized, and will eventually make their way through the editing process. Since this process is separate from their actual website, it is also unconnected from their main WordPress installation.

Using the REST API, the publication could easily connect the staging area to their primary WordPress site, and send over articles once they are ready for publishing. This way the main site remains uncluttered and more secure, since the staging area and its users are kept separate.

Wired homepage
Wired uses the REST API in a number of ways, including syndicating content from a beta version of their site.

Wired recently carried out a similar process. They developed a beta site that needed to use the same content as their live site. Simplified, here are the steps they took:

  1. When a new post on the regular site was published, it connected to the beta site by authenticating over the REST API.
  2. The REST API sent the new post’s information to the beta site.
  3. The beta site received the new post over the REST API, verified it was from an authenticated source, and replicated the new post.

This way, they were able to keep the beta site’s content completely in sync with the live site automatically. When the time came to switch, the data was already up and ready to go! Post Status wrote an in-depth piece about the process that should give you enough to get started.

4. Offer Site Interaction Through Mobile Applications

We’ve already talked about using React.js to build web and native mobile applications. However, you can go beyond simple blog-to-app functionality by taking advantage of custom post types and other interactive features such as comments and likes. In this example, the REST API would let you consume data feedback from a user on the native mobile app (such as an incoming comment), and update it live on the site.

Calypso, a React-powered app, enables site interaction by using the REST API. This is the official Automattic app for managing WordPress sites on native operating systems (such as MacOS, iOS, and Windows), as well as within web browsers.

Calypso landing page
Automattic’s own Calypso uses React.js and the REST API to drive user interactions, and is a great example of a headless CMS.

Under normal circumstances, you’d offer this functionality once you’ve built a decoupled front end interface. Here are the general steps:

  1. Establish the interaction you’d like to have with the site – for example, adding a comment or creating content with a new post type.
  2. Build a custom REST API endpoint, if necessary.
  3. Add it into your front-end interface.

While these are overly simplified steps, the integration will be straightforward if you’re starting with a pre-built front end interface.

Conclusion

The REST API can be a hard thing to wrap your head around at first, because it brings a traditionally complex developer issue into the mainstream. However, there are plenty of real world scenarios that will benefit from using the REST API. Using it gives you the chance to take an ordinary WordPress site and build something unique.

In this article, we’ve covered four use case scenarios for you to use the REST API:

  1. A decoupled front end interface, for example a web application built with React.js.
  2. Syndicated content between multiple sites, useful for content spread across multiple WordPress accounts.
  3. Syncing or sending content from one site to the other, which might come in handy for a complex content creation environment.
  4. Building site interaction into mobile applications, such as liking or commenting.

Which of these applications of the REST API are you excited by? Share your feedback in the comments section below!

Image credits: Cris Saur.

John Hughes

John is a blogging addict, WordPress fanatic, and a staff writer for WordCandy.

The post 4 Ways You Can Start Using the WordPress REST API Right Now appeared first on Torque.

Google Search is Going Mobile-First – Here’s What It Means for Your WordPress Site

If you’re a WordPress website admin who is starting to feel some heat over Google’s mobile-first index and how search engine rankings will be affected as a result, you’re not alone. Webmasters and SEOs are scrambling to transform antiquated websites into more mobile-responsive versions.

But before making any major changes, it makes sense to know what you’re up against with Google’s mobile-first index and the changes it brings to ranking on the search engine results page (SERP) for your desired keywords.

What is Google’s Mobile-First Index?

In November 2016, Google announced its mobile-first indexing system, which first takes into account a website’s mobile page before its desktop page when ranking the site in search. Though the full force of Google’s mobile-first indexing is yet to be seen, the change was perpetuated due to an increasing number of searches happening on mobile devices over desktop.

According to web analytics firm Statcounter, mobile and tablet browsing has risen to 51.3% of all web browsing instances versus desktop’s 48.7%. Up until this point, page ranking depended completely on the desktop version of a website. It seems fair to assume that this number will only continue to grow and Google is keeping adapting its search indexing accordingly.

Google has initiated various experiments to parse through the content, links and structured data of the mobile version of your site – if one is available. Rumor has it that Google’s search index will be split into two: a mobile version and a secondary desktop search, which will receive less regular updating than Google’s mobile index.

It has also been confirmed that single indexing is here to stay, but in the near future, it may be solely based on the mobile version of a website. If there is no mobile/responsive version of your website (or a client’s), search engine rankings will be affected. Expect to see a lot of shifting from those at the top of the SERP now, and those who take over when Google’s mobile-first index is completely in place.

SEOs are chiming in that this change is a logical next step for Google and will push companies to create responsive websites instead of separate mobile and desktop version of a website. This past tactic of maintaining two separate websites is notorious for causing headaches more so than being a useful way to serve content to mobile visitors. Though Google currently has two separate indexes and treats them as equals, mobile will become the primary index and the one to optimize for.

As Google conducts experiments leading to a complete mobile-first index, search users will randomly be chosen for desktop-first or mobile-first index results. No one will be able to control the results they get because they won’t even be aware that it’s happening. As Google’s mobile-first index improves, it will eventually take over as the primary index. There’s still the chance that Google could return to the desktop-first index if mobile-first isn’t showing results (after all, they first called mobile-first an “experiment”), but it seems unlikely.

According to Google: “Our search index will continue to be a single index of websites and apps, our algorithms will eventually primarily use the mobile version of a site’s content to rank pages from that site.”

Paul Haahr, a software engineer at Google, reiterated the impending nature of Google’s mobile-first index, tweeting: “[The] index of mobile pages for mobile users and index of desktop pages for desktop users won’t happen.”

Now that you have a fair understanding of Google’s mobile-first index, here’s how site admins can prepare:

How to Prepare for Your WordPress Website for Mobile-First

Let’s start with the good news first: if you have a responsive website or a dynamic serving site where content is the same across mobile or desktop, you likely won’t have to change much of anything. That said, there’s still at least one step you should take to help your websites in the era of Google’s mobile-first index. If you are a site admin or owner that has only verified a desktop site on Search Console, make sure that you also add and verify the mobile version of your website.

If you only have a desktop website and don’t plan on making a mobile-responsive version of that website, Google will still index your site using a mobile agent. On that note, if you only have a desktop site, Google will still index it, but instead look at it through the eyes of a mobile user. If site configuration is different across mobile or desktop, consider changes to the site, as detailed below.

Changes to Different Website Versions

Make sure that both your desktop and mobile site serve structured markup. To check equivalence between the two, use a structured data testing tool to compare the URLs of both sites. When adding data to the mobile site, avoid adding large amounts of markup that aren’t relevant.

Detailed structured markup can help Google index your site and there are many tools and best practices for implementing it, but adding irrelevant data can confuse the Google algorithm and produce skewed results. Google has a set of guidelines to follow, and you will likely incur penalties if you practice shady structured markup tactics. After all, trying to trick Google is not unlike other black hat SEO efforts that can cause a manual penalty or total deindexation.

When comparing mobile versus desktop versions of your website, make sure to use the robots.txt testing tool to check if the mobile version is accessible to Google’s bots.

Optimizing Your Website for Mobile

If your website is not optimized for mobile through responsive design (or a completely separate mobile version), you’ll want to start planning for some major changes. For site admins, this may be an upsell opportunity where you can use Google’s announcement as an opening point to the conversation. If clients aren’t ready to make changes yet, follow up with them in a few months with data on how their SERP rankings are being affected by non-action.

In the past, many companies created both a desktop and mobile version of their websites. Though this was a critical step in encouraging consumers to use their phones to seek information and shop, it ultimately resulted in inefficiencies. Whenever the desktop version of a website needed to be changed, it was also necessary to duplicate efforts and change content on the mobile version as well.

At it’s simplest, a mobile optimized site has a responsive design. So instead of updating both a desktop and mobile version of a website, responsive design means you only have to update the website once. If responsiveness wasn’t built into the website from day one, a responsive retrofit can be an option, depending on the complexity of the website.

The following include other basic considerations for mobile optimized websites:

  • Don’t use Flash – most phones can’t display it. Instead, use HTML5 or Java as necessary.
  • Don’t use pop-ups carelesslyGoogle defines most of them as “intrusive interstitials” and sets forth multiple rules for how to use them if you must. If you’re trying to get email subscribers, these alternative methods can still be effective – without breaking any of Google’s new interstitial rules.
  • Incorporate “finger friendly” design, where users can scroll and tap with ease. Ensuring 44 pixels of whitespace around elements is considered ideal.

Besides making sure your mobile website is optimized, make sure the other technical pieces of your website are up to par.

Technical SEO & Improving Site Load Speed

Our in-depth guide to improving site load speed gives a lot of detail regarding specific tactics, but here are a few critical elements to consider for Google’s mobile-first index:

  • Activate browser caching – Browser caching involves saving an HTML copy of the site to memory so that when a user opens it next time, it does not have to completely reload.
  • Decrease HTTP requests – A tool like Pingdom can be used to see how many HTTP requests your website is making. Reducing the number of images or showing less posts per page are two easy ways to decrease the number of HTTP requests on your website, which helps to increase page load speed.
  • Optimize Images – Compress images to reduce file size (and page load time). We recommend using Smush Pro.

Local SEO Considerations

Local businesses have much to gain from Google’s mobile-first indexing. According to Google, 50% of consumers who conducted a local search on their smartphone visited a store within a day, and 34 percent who searched on a computer/tablet did the same.

Make sure that any local businesses you manage follow local SEO best practices, such as:

  • Adding a Google Map to their website
  • Including all relevant contact information on the website
  • Integrating customer reviews on the website

Preparing for Google’s Mobile-First Index

Google’s mobile-first indexing shouldn’t be cause for panic, but instead should serve as an opportunity to make sure that the websites you manage are mobile friendly. If they aren’t, it serves as an opener to talk with your clients about building a new mobile friendly WordPress website or implementing a responsive retrofit. Don’t wait until search rankings are affected – the time to act is now!

Ask Yoast: Give a division a separate domain?

A website of a larger company often represents multiple divisions. If one division outgrows the others, or if expectations for one division are very high, the need for a separate website or domain may arise. What’s best to do for SEO in such a case? Set up a new domain for that division? Or build it on a sub-domain? In this Ask Yoast, we help you determine the best solution in case a division wants its own website.

Brooke Brown of smartbridge.com emailed us with this question:

“One division of our company is getting more presence, so they want to build that division its own website. What’s the best option?

1. Build it on a new domain like smartbridgemobility.com;
2. Build it on a totally separate domain;
3. Build it on a sub-domain like mobility.smartbridge.com.”

Check out the video or read the answer below!

Become a technical SEO expert with our Technical SEO 1 training! »

Technical SEO 1 training$ 199€ 199 – Buy now » Info

Division on separate domain

In the video, we help you decide what’s best for SEO if you want to give a division a separate website:

“Well Brooke, first of all I consider myself pretty good at branding and if your brand “Smartbridge” is strong, I would consider doing something much simpler. I would make it http://bit.ly/2qvAhkx. Give it its own look and feel, but keep it on one domain.

If you don’t want to do that, but you want to separate the two, then I would give it an entire brand for itself. Because that probably is best in the long run to sell or whatever you want to do with it. I’m not a big fan of sub-domains because they lead, or can lead, to all sorts of technical issues. And they’re a bit of nothing really. It’s not its own brand, it’s far too attached to your main domain.

So I would probably choose a sub-folder and if you can’t do that I would choose a completely different brand. Good luck!”

Ask Yoast

In the series Ask Yoast we answer SEO questions from followers. Need some advice about SEO? Let us help you out! Send your question to ask@yoast.com.

Read more: ‘Site structure: the ultimate guide’ »

Using Content Upgrades to Boost Your Subscribers

Chances are if you’ve been working on growing an email subscriber list for your blog for a while, you’ve heard the phrase “content upgrades.” But what is a content upgrade, exactly, and how can it help boost your subscribers?

Put simply, content upgrades are bonus pieces of downloadable content used to attract new subscribers to your mailing list. They enter their email address, and boom, they get the free stuff! The tricky thing about them, though – and what makes them so effective – is that content upgrades should be tailored to the post they are being used on. That means a content upgrade is not simply general material you can use all over your site; it is specific to a particular post.

Harnessing this technique and only using a piece of bonus content in one spot on your site might not seem a time efficient or scalable way to boost subscribers. But in this article, you’re going to discover that you absolutely do have time to create content upgrades, because they work. We’re also going to cover how to get started posting your own content upgrades, to help boost your subscribers like never before.

Anatomy of a Content Upgrade

Content upgrades can take a few forms, which is why you may have never noticed them up until now. They can take the form of opt-in forms, which interrupt the content with a call-to-action to sign up; pop-ups or fly-ins; or buttons in the middle of posts that, when pressed, pop up a window asking for an email address.

Here are a few examples of content upgrades in action.

First, here are content upgrades at their most basic: a call-to-action in simple text, highlighted by a colored box. This example is from Brian Dean’s blog, Backlinko.

Content Upgrade Example from Backlinko

Second, here is an example of a popup content upgrade by LeadPages. Note that it perfectly relates to the post being read.

Content Upgrade Popup Leadpages

Finally, the CoSchedule blog is doing an awesome job with content upgrades – here is a beautifully-designed button that leads to a popover opt-in form.

CoSchedule Content Upgrade Example

Clicking on the call to action opens the popover opt-in form.

CoSchedule Opt-in Form Example

Whatever form they take, they will always have two things in common. First, they will relate very well to the topic at hand. So well, in fact, that the upgrade can probably only be used on that one post. Second, they will collect an email address, and once that email is collected, give the visitor access to free bonus content.

Why Content Upgrades Work

Put simply, content upgrades work because they address the real problem your reader is having, right now. It’s why they are on your site. They landed on that page, often from a search engine, because they are looking to solve a problem. Your content upgrade is you offering to solve that problem, and then some because it is an extra golden nugget of information that they can get hold of for the price of their email address.

Different bloggers who have tried content upgrades have shared varying case studies about what has worked for them. Brian Dean from Backlinko had a 785% increase in conversions in his test. In a post for The Daily Egg, Devesh Khanal shared his own experience getting a 492% increase in conversions from content upgrades. This second one was for a content upgrade that Khanal reportedly created in minutes.

Clearly, content upgrades work, and it turns out that you don’t even need to invest a ton of time or money into making them work for your blog.

10 Content Upgrades You Can Create Right Now

Here are ten ideas for content upgrades that are easy and cheap to create. Use these ideas to upgrade some of your top-performing posts and watch for the results.

  1. A checklist summarizing the post. These are great for extensive or highly technical how-to posts.
  2. A cheat sheet, which packs a ton of information into a concise and well-organized download.
  3. A printable worksheet or planner This is great if your content requires the reader to follow along answering questions or entering their own information.
  4. A nicely-designed, downloadable PDF of the blog post. Some people just prefer to download a PDF to read later! This also can include infographic versions of your blog posts, if you choose to create those.
  5. Part two to the existing post, only available as a download.
  6. A template or a kit readers can use in conjunction with the post, especially for how-to posts. This helps your reader get started right away, without having to determine how to organize their work.
  7. An Excel spreadsheet or Google sheet pre-laid out with formulas and functions.
  8. Original research or data referenced in the blog post. This is especially valuable as a resource to other bloggers doing research in your niche and can result in more backlinks.
  9. A transcript (for recorded content such as videos and podcasts). Outsourcing the creation of this content is readily available at affordable rates from sites like Upwork and Fiverr.
  10. A challenge or guide for adopting a new habit.

Content Upgrade Do’s & Don’ts

There are some general guidelines to keep in mind as you start creating your own content upgrades.

Do really focus on making the content upgrade extremely useful to the kind of person who will be reading your blog post. Try to understand what extra information is needed for the post before you start creating an upgrade.

Don’t try to adapt a general lead magnet (free bonus content) to suit specific blog posts. The reason it is general is because it applies to a variety of visitors to your site. A frequent reader will also just gloss right over a lead magnet they’ve passed up on before.

Do use an eye-pleasing design for your content upgrade. Pat Flynn of Smart Passive Income suggests hiring a designer to create a template you can use over and over.

Don’t just package up the blog post into a plain PDF. There needs to be something extra – that’s why it’s a content upgrade.

Do promote the content upgrade throughout your blog post, not just at the end. Try to include a call to action at the top of the post and anywhere throughout that is especially relevant to the upgrade you are offering. In posts where Brian Dean offered the content upgrade at the beginning as well as the end of the post, he saw conversion rates 315% higher than those where he only promoted it at the end.

How to Create Content Upgrades in WordPress

At first glance, content upgrades might seem a little tricky to implement. While adding these bonus offers to your posts isn’t the easiest feat in the world, there are some great services and plugins that make the process simpler.

Thrive Leads

Boost Your Subscribers with Thrive Leads

Thrive Leads is well-regarded by many bloggers for how easy it is to use. This plugin makes it simple to add opt-ins, A/B test, and see your results. It also offers a number of opt-in form styles, such as popups, sidebars, sticky menus, in-line boxes, overlays, buttons, and more. Thrive Leads offers a single-site license for a one-time price of $67.

MonsterLinks

Use OptinMonster's MonsterLinks feature

MonsterLinks is a tool within OptinMonster that allows you to turn any link or image into a two-step optin: your users click the call to action, then a popup appears, inviting them to subscribe. OptinMonster starts at $19 a month, or $9 a month billed annually.

Content Upgrades Pro

Content Upgrades Pro email marketing plugin

Content Upgrades Pro is one of the simplest and most affordable options on this list, at just $47 for a one-site license. It works similarly to the MonsterLinks plugin above, allowing users to click a button to open a popup opt-in. They also offer a free plugin that you can use to try it out. Watch out, though, as the plugin is very limited and has not been updated in a long time.

Easy Content Upgrades

Easy Content Upgrades Plugin

Easy Content Upgrades is, as the name suggests, very easy to use. In fact, the image above walks you through the simple six-step process of creating a content upgrade offer for your readers. The plugin starts at $29 per year for a single-site license.

Free Content Upgrade Management Options

Most of the content upgrade plugin options are paid plugins, but there are a few free options out there. Mentioned above is the free version of the Content Upgrades Pro plugin. You can download it from the WordPress repository here. Brittany Berger also outlines four different ways to create content upgrades for free using Zapier and other integrations in this post on her blog.

Also, don’t forget our very own Bloom WordPress email opt-in plugin can help you boost subsribers and use content lockers to grow your list.

Final Thoughts

Content upgrades do take a bit of work at the outset because you need to create a piece of bonus content and then find a good way to offer it within your post. However, once set up, the results of this strategy can be very impressive. Content upgrades are one of the best ways to add more value for your readers and in turn, boost your subscribers.

Now that you know how to create and deliver content upgrades to boost your email subscribers, how are you going to use them on your site? Please share your thoughts in the comments below. 

Article thumbnail image by LITUSPRO / shutterstock.com

The post Using Content Upgrades to Boost Your Subscribers appeared first on Elegant Themes Blog.