My Favorite WordPress Features

As you work with WordPress for some time, you begin to realize WordPress is much more than a blogging tool. Sometimes, even more than a regular CMS. In this post, I will talk about the different features/add-ons of WordPress and how you can utilize them for your next problem or project. Specifically, this post comes from my experience with WordPress and what I love about the different WordPress features.

Template Hierarchy

Sooner or later, you will have to learn about the Template Hierarchy, especially if you are venturing out with building custom themes.

For this, I would encourage you take a look at a typical theme and try changing the template structure. Or you could start playing with Underscores if you are adventurous and more so if you have a project which needs a custom WordPress theme.

Template Hierarchy is what allows you to build a site which has pages exactly the way you or the designer intended. For instance you can build a custom page to list posts from a specific category or a custom structure for a single post from a category. Tip: learn what slug means in WordPress.

Advanced Custom Fields

Almost all the client projects that I have worked on, we have used ACFs, Even yesterday, I mentored someone on how to properly use the Repeater Field in ACF. 

ACF helps you add custom fields to your posts/pages or other WordPress objects. The alternative is to use meta and create metaboxes which creates more work for the developer.

Early on, when I was using ACF’s, it was a pain to create the custom fields in the local development environment and also in the staging and production environments. This gets pretty annoying as there are regular changes to be made to the fields. I then discovered export to PHP – which has saved me tons of hours. You simply export your custom fields to PHP code and include it as part of your functions or any other PHP file that will run on every page. Over time, you won’t need to even create ACF’s using the GUI – you will be able to copy the configuration code and make modifications as you see fit.

Custom Post Types

This post wouldn’t be complete without CPTs. WordPress allows you to create content in any way you want. For example, CaseFora has Cases, Acts, Rules etc as CTPs. Combine it with metadata or custom fields and you have a very powerful CMS.

WooCommerce

Building an e-commerce store? Use the world’s largest e-commerce platform, powered by a WordPress plugin called WooCommerce.

We have combined WooCommerce with Learndash and Restrict Content Pro (two other plugins) and a payment gateway among other plugins to create an online academy called LexCampus for aspiring patent lawyers.

We were able to combine WooCommerce with WooCommerce Bookings plugin to create the entire online booking experience for an adventure park. This pulled in data from a remote XML endpoint and made bookings directly to their remote kiosk. This was an exciting project and I learnt how filter and action hooks actually work in WordPress – check them out!

WP Localize Script

Another very useful WordPress API. I use this to expose PHP as JavaScript variables. For example, you may have to expose the current URL of your website or the various endpoints or keys, especially if you are plugin a Single Page Application using WordPress. This is the ideal way I discovered to do these things.

Calypso

Essentially a product of Automattic, this powers the entire admin experience of WordPress.com via a Single Page Application using the REST API, React and other JavaScript technologies. I was introduced to this in early 2016 and I use it occasionally and love it. If you want to work with a large React application, clone WP Calypso and see how it works. Bonus points for contributing. 

By the way, not only is this available for WordPress.com websites, even a self-hosted site can access this by installing the Jetpack plugin. It has streamlined the user experience for WordPress admin and I think it will soon be the favorite way to access the admin panel for many WordPress users.

Admin Ajax

What if you want to query data from JavaScript to PHP. This feature can help you with that. For a project, we pulled almost all data from PHP using Admin Ajax and jQuery. The site resulted in an almost Single Page Application User Experience. This was before we had WP REST API.

WP REST API

Easily my favorite feature, this allows your WordPress content to be exposed as JSON data via the various endpoints. I built our startup’s site using this and React even before the WordPress REST API was merged into Core.

We later powered CaseFora using this feature alongside React and Redux.

I also built two different open-source projects based on the REST API. Recently, I built M2Blog Reader – a place to read all my posts from one convenient place. Navigation is super simple and instant thanks to fetching all the content at once from the WordPress.com REST API (since it has HTTPS support).

GraphQL

WP-GraphQL is a plugin built by Jason Bahl and team and it exposes the WordPress data as GraphQL – it is a way to query data exactly the way you want it, as opposed to REST API where the data you get is fixed by the endpoint and does not vary as per your needs.

I’m trying to use this plugin to build something but I’m the very early stages now.

Gutenberg 

I have written about this before, but needless to say it has been my favorite recent feature for WordPress. Soon to be merged to core, Gutenberg allows creators to make content in different ways – empowering them with more features to create more engaging posts and pages.

I took a shot at creating custom blocks and released my first WordPress plugin called Testimonials Slider Block. See it in action below. I have collected the past comments on this blog and created  them as testimonials here:

Conclusion

While there is a lot to love about WordPress, the above are a few that stood out for me. I would like to hear what you like best about WordPress – please leave them in the comments section below. Thank you!

Leave a Reply

Your email address will not be published. Required fields are marked *