Tag post
WordPress Conditional Tags Cheat Sheet With Examples
Conditional tags are functions that return true or false depending on the page being viewed. Use them to show or hide content, or to load scripts only where they are…
How To Upload Files From The Front End In WordPress With Media_Handle_Upload
Use media_handle_upload() to accept a file from a form on your site and add it to the Media Library. WordPress validates the file type, moves the file and creates the…
WordPress Sanitizing And Escaping Cheat Sheet: Secure Your Code
Two rules keep WordPress code safe: sanitize input when data comes in, and escape output when data goes out to the browser. Sanitize early, escape late.
How To Run Safe Database Queries In WordPress With $Wpdb
The global $wpdb object lets you query the WordPress database directly. Use it when the standard functions are not enough, and always use $wpdb->prepare() to protect against SQL injection.
How To Create Custom Urls In WordPress With Add_Rewrite_Rule
Rewrite rules map a pretty URL, like /deals/summer-sale/, to a query that WordPress understands. Use them when you need URLs that do not belong to a normal page, post or…


