Controllers are an important part of Laravel MVC (Model, View, CONTROLLER). They are useful for organizing request-handling logic and help to keep the entire code structured and maintainable. This post is a brief primer on Laravel controllers.
An SQL SELECT statement may often return thousands of rows. And when building sites, we usually don’t want to dump all those rows onto a single page (for speed and UX reasons). Instead, we split the results across multiple pages via PAGINATION.
TinyMCE is a rich-text editor that helps convert the HTML textarea element into a WYSIWYG editor. While working with it recently, I noticed that it doesn’t work well with AJAX out of the box. This article explains the problem and provides a solution.
The title “Shop” shown on the WooCommerce shop page is just plain ugly in my opinion. Especially if you use the WooCommerce shop page as your site’s homepage. Here’s how to change/remove it from the homepage without affecting other archive pages.
WordPress posts by default have an excerpt meta box where you can manually type in a custom excerpt. Pages don’t have this feature out-of-the-box. If you would like to enable excerpts on your WordPress pages, use the code in this post.
If you use the a3 Lazy Load WordPress plugin with a Genesis theme, you may notice an issue with lazy loading of Genesis archive images. Single post images are lazy loaded correctly. Images on archive pages are not. Here’s the code to fix this issue.