Recently while working on a large-scale WordPress site, I encountered a tricky situation. I had quite a lot of locality data for Australian states, suburbs and LGA’s (Local Government Areas). We are talking about tens of thousands of items in the database.
At first, I made all of these custom taxonomies hierarchical. Part of the reasoning was that users could visually select values from the meta boxes (hierarchical taxonomies look better). Initially, it wasn’t a problem, but as more data was added, saving posts took forever, I was getting timeouts, and queries were slow.
I have been working on a WordPress site that parses remote news API’s and requires not only parsing the news format JSON but getting any associated media and downloading them.
Herein lies the problem: the download_url function that WordPress provides does not support passing in headers. If you are working with a remote API that requires passing an authorization header, then this function won’t work.
Unbbeknownst to some, the underlying download_url function uses WordPress request methods to make the request for the file. Taking the original function from the codebase and making some simple tweaks, we end up with something like this.
I have been working on quite an ambitious WordPress project that has a lot of custom REST API endpoints to work alongside an Aurelia SPA application running on top of WordPress.
In this project, I am working with a location JSON file which is 34mb in size. Returning the entire file contents would be a disaster, so I created an endpoint with the ability to search this endpoint. As you might have learned if you are reading this, search queries can sometimes have spaces.
When it comes to developing on WordPress locally, you have a few options. You have the tried and tested XAMPP, WAMP, MAMP and if you’re feeling adventurous: Docker.
I will recommend an option that isn’t any of the above, it’s one you might not even be familiar with, but spoiler alert: it’s the best. It’s called Local, and it’s the best way to develop WordPress sites locally.
What makes Local one of the best options around for WordPress development is:
This is quite a specific issue you will only encounter if you are attempting to call the Yelp Fusion API using any of WordPress’ request methods such as wp_remote_get (that’s probably the one you are using). In attempting to do so, you will find yourself faced with a 403 error.
You’re passing up your API key or valid token, but still, the request won’t work.
This issue goes back a few years, but the bottom-line is Yelp block requests made from user agents featuring “WordPress”. The default user-agent for wp_remote_get and other methods just so happens to be this.
It is difficult to believe that WordPress’ Gutenberg editor is almost two years old (released in WordPress 5.0 in December 2018). Since then, Gutenberg has seen a plethora of development and resources thrown at it, promising a revolutionary writing experience driven by blocks.
So, two years on, has Gutenberg become the beloved new writing experience in WordPress? Have the wrinkles been ironed out? Nope.
Despite the amount of work developers have put into polishing Gutenberg and trying to make it a decent writing experience, many continue to avoid it at all costs.
Before I used Laravel, I used Codeigniter and I had the perfect workflow of being able to use WordPress as the administration panel, taxonomy system, authentication, users and post types.
I hate having to create administration panels from my previous experience working for a WordPress development agency, as the admin packages out there are complicated, don’t work correctly and are severely lacking in the features department.
In Laravel 4, the process for integrating WordPress is basically the same. You disable the theming functionality and include the WordPress blog-header bootstrapping file to include WordPress’ core functionality and features.
This is something I have been wanting to do for a while now, but like many, have not had the time. Someone has created a WordPress Plugin boilerplate which gives you a nice little start when creating a WordPress plugin.
As anyone who has modified an existing plugin or created their own plugin for WordPress knows, there is no right or wrong way to do it. You can write it solely procedurally, object oriented or you can intertwine and mix both. The result is never pretty and I have seen a lot of bad plugins out there.
Provided nothing is pushed back, the WordPress JSON REST API plugin is being integrated into the WordPress core and is slated for version 4.1.
As WordPress becomes more and more like a PHP application framework, the robustness of WordPress continues to grow. The JSON REST API will be a massive feature that will make creating single page websites and applications a whole lot easier. Being able to fetch a page, archive or single post as JSON and then use that to create fast and lean single page websites will be a welcome addition.
First time Woocommerce user, long time WP-Ecommerce user. I recently built a store using WordPress to sell some t-shirts online as a work project via my employer which had basic variations, bulk pricing and you pay via Paypal – sounds simple enough right?
I wanted to see what all of the fuss was about Woocommerce, this was a HUGE mistake. Seriously, if you are considering Woocommerce by all means reconsider unless you have deep pockets. In comparison to WP-Ecommerce (whom I have no affiliation with) Woocommerce feels like a cash grab more than it does an e-commerce solution for WordPress.