<!DOCTYPE html> <html lang=”en”> <head> <meta charset=”UTF-8″> <meta name=”viewport” content=”width=device-width, initial-scale=1.0″> <title>Your Page Title Here</title> <meta name=”description” content=”A brief description of your page for SEO.”> […]
Create A Discord Webhook
Webhooks are great ways to allow third party apps to post to your Discord server to keep your server members up-to-date – plus they’re super […]
WordPress: Update Plugin Via GIT
Create a class to handle updates Add this to your plugin’s main PHP file or a separate updater file: <?php class GitHub_Plugin_Updater { private $slug; […]
MYSQL: Check User Exists & Grant Privileges On Database
Check if the User Exists SELECT user, host FROM mysql.user WHERE user = ‘your_username’; If the user doesn’t exist, create them first: CREATE USER ‘your_username’@’%’ […]
WordPress: Plugin To Download Random Posts To A CSV File
The following code will create a plugin that allows you to download random posts based on selected categories in an admin page. 3 CVS files […]
WordPress: Spoiler In Post Content Function
The following code can be added to your WordPress functions.php file or added as a plugin to allow you to mark sections of your post […]
Tabbed Navigation With QueryString Open Tab Selection
The following code will create a series of tabbed sections on a single page. Each tabbed section will have a series of boxes that contain […]
Validate UK Postcode
The following script will take the input from the form and validate a post code in UK Format eg. Lettter Letter Number Number Letter Letter […]
RegEx To Replace Empty Tags with just IDs Using Notepad++
Here is an example html output from a DOCX file imported into WordPress (in this case with the Mammoth docx converter plugin): <h2><a id=”post-44034-_7ttglipb267h”></a>Header Text</h2> […]
Remove First Character From A Field In A Database
Assuming we have the following entry in our database: /go/123456 But we require: go/123456 UPDATE `TABLENAME` SET `FIELDNAME` = SUBSTRING(`FIELDNAME`, 2) WHERE `FIELDNAME` LIKE `/%`;