It’s fairly common to find yourself on a situation where you want to use a specific URL to show a custom content (perhaps something an archive page with two different custom post types), and think: “well, that’s easy. I’ll just create a page to register the URL and a custom page template where I’ll query the contents I need”.
Well, it turns out that there’s a better way of doing this using rewrites and hooking into the right WordPress’ filters — which, by the way, it’s the recommended way to do it by the WordPress VIP team.
Let’s check this technique with an example.
Continue reading “Registering custom URLs with custom templates in WordPress (without using page templates)”
Conversational bots are one of those things that might seem “magical” at first glance, but on a deeper look you can discover that there’s nothing more than a clever new way of doing things.
Matthew Honnibal proposes we call this kind of technology Linguistic User Interface, by analogy with Graphical User Interfaces, explains clearly and simply how language input it’s not that different from a click, and why the opportunity for taking advantage of this kind of interfaces it’s probably much more narrow than people may think.
Read his full article on: A Natural Language User Interface is just a User Interface
Localization and internationalization of an app or site it’s a challenge that’s not specially hard on the technical side, but that it can ceirtanly become difficult for social and behavioral aspects, such as our own etnocentrism, lack of standardized standards, or even standards that conflict with actual use or user expectations.
The development team at Etsy identified three attributes that affected currency formatting: the currency, user location and user language. Their post on How Etsy Formats Currency shows how to correctly format currency and some of the practical decisions that are involved in the process.
Basic Authentication it’s often used as a simple security measure or as a temporary authentication method while developing with certain APIs.
While the WordPress HTTP API doesn’t have explicit support for basic authentication, it’s still possible to use it as a header:
$request = wp_remote_post(
'body' => array( 'foo' => 'bar' ),
'headers' => array(
'Authorization' => 'Basic '. base64_encode( $username .':'. $password )
Remember that if you’re sending an unencrypted request, all the headers will be sent in plain text, so you should only use it over HTTPS.
It’s very likely that you already know about or even read the latest issue of Bloomberg, entirely dedicated to answer What is Code? — if you haven’t, you definitely should go read it.
The entire piece is informative and fun to read, and there’s probably something new for everyone reading it. My favourite highlight is:
Computing treats human language as an arbitrary set of symbols in sequences. It treats music, imagery and film that way, too.
It’s a good and healthy exercise to ponder what your computer is doing right now […]
Thinking this way will teach you two think about computers: one, there’s no magic no matter how much it looks like there is. There’s just work to make things look like magic. And two, its crazy in there.