Tag: WordPress APIs

Understand Caching with WordPress Transients API

Computer performance revolves, in large part, around the idea of caching: “storing something in a more-ready and quicker-to-access state,” so that you can more quickly deliver the final result.¬†The WordPress Transients API is a tool for caching, and an important way to improve performance in WordPress.


Why and How To Use Custom Post Types in WordPress

Organizing folders in the same way WordPress organizes custom post types

WordPress sites are great at holding content. Got some words and pictures you want to show the world? WordPress is a great tool for that job. Probably the best. But by default it only has two types of content: Posts and Pages. These are great, by many people have many other types of content: client testimonials, documentation of a project, past projects listings and more. Posts and Pages can be made to house these sorts of items, but there’s a better option: WordPress custom post types.






Practical Uses of pre_get_posts

In WordPress, pre_get_posts is an action that makes it possible to modify an existing WP_Query, before that query is actually run. pre_get_posts offers some solutions that are more performant than writing a custom WP_Query, and enables solutions to other problems that would be quite difficult otherwise.