Add the following function into your theme’s functions.php file or as a standalone plugin. This code will remove any existing WordPress canonical tags and replace […]
Responsive Navigation Menu With Mobile “Hamburger” Button
The following code will provide a navigation bar that collapses on Mobile view. <!DOCTYPE html> <html lang=”en”> <head> <meta charset=”UTF-8″> <meta name=”viewport” content=”width=device-width, initial-scale=1.0″> <title>Responsive […]
CSS UL Li Styling
<style> main ul li a { display: block; padding: 15px 20px; margin-bottom: 10px; text-decoration: none; border-radius: 20px; /* Pill shape */ transform: scale(1); transition: background-color […]
Basic CSS Template
/* Basic CSS Reset to help with cross-browser consistency Learn more: https://meyerweb.com/eric/tools/css/reset/ */ html, body, div, span, applet, object, iframe, h1, h2, h3, h4, h5, […]
Basic HTML Template
<!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.”> […]
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 […]