Using wpdb to connect to a separate database

The wpdb object can be used to access any database and query any table. Absolutely no need to be Wordpress related. use all the wpdb classes and functions like get_results, etc so that there’s no need to re-invent the wheel.

Read More

Hiding DOM Elements with Ease

<p hidden>I’m invisible!</p> No need to rely solely on JavaScript to hide elements. Utilize the native HTML hidden attribute. This has a similar effect to display: none; in CSS, making the element disappear. article

Read More

Checking Network Speed

if (navigator.connection) { const downlink = navigator.connection.downlink; console.log(`Current download speed: ${downlink} Mbps`); } else { console.log(“Network Information API not supported”); } article

Read More

Preventing Text Pasting

<input type=”text”></input> <script> const input = document.querySelector(‘input’); input.addEventListener(“paste”, function(e){ e.preventDefault() }) </script> article

Read More