Registering a custom post type does not create its rewrite rules, so the archive 404s until permalinks are re-saved. The fix that circulates is flush_rewrite_rules() on init, which…
In multisite, switch_to_blog() repoints the database tables and the uploads path. It does not reload the other site’s active plugins, its theme, or anything a plugin cached in…
A WooCommerce product is a post, so get_post() returns something usable and the price is right there in the meta. It is also wrong for variable products, where…
Printing a <script> tag straight into a template puts it wherever the template happens to run, which is why so many themes have jQuery loaded twice and a…
wp_mail() is PHPMailer configured to use PHP’s mail(), which hands the message to whatever MTA is on the box. The message therefore leaves from the web server, as…
Three installs, three plugin sets, one person patching them — a security release forgotten on the third site for six weeks. The import order, and what a shared…