Move WordPress to HTTPS without redirect loops
Establish working TLS, update the correct WordPress addresses and add HTTPS redirects in the layer that actually terminates the connection.
Open Code ByteMark the current navigation link in PHP
Render accessible active navigation from a small PHP route list, using exact path matching and escaped output instead of parsing HTML strings.
Open Code ByteList approved files from a directory with PHP
Build a small public download list with a fixed directory, an extension allowlist, escaped labels and no hidden files or symlink traversal.
Open Code ByteRefresh one part of a page with fetch
Poll a small same-origin JSON endpoint without overlapping requests, keep the last good value on failure and stop cleanly when the view is removed.
Open Code ByteDownload a password-protected file safely with PHP cURL
Fetch a fixed HTTPS resource with HTTP Basic authentication, bounded response size and timeouts, then save without overwriting an existing file.
Open Code ByteSort a WordPress post list without replacing the main query
Use a separate WP_Query for an alphabetical list, escape its output and restore the original post context afterwards.
Open Code ByteDisplay a Facebook Page count without relying on the old public endpoint
Why the anonymous Facebook likes snippet is no longer a sound integration, and how to render an authorised, cached count safely.
Open Code ByteKeep your WordPress team's visits out of analytics
Exclude editorial users at the tracking integration, check caching and consent, and avoid reviving the retired Universal Analytics script.
Open Code Byte