Skip to content

Instantly share code, notes, and snippets.

View eirichmond's full-sized avatar

Elliott Richmond eirichmond

View GitHub Profile
@jackreichert
jackreichert / inputtitle_submit.js
Last active September 26, 2020 15:03
Example showing how to use AJAX in WordPress
(function ($) {
$(document).ready(function () {
$('#next').click(function () {
$.post(
PT_Ajax.ajaxurl,
{
// wp ajax action
action: 'ajax-inputtitleSubmit',
// vars
<?php
/**
* Plugin Name: Static Templates
*
* If most of your site content is in .php template files, and you're tired of
* creating new pages, assigning them page templates, creating page templates
* then doing it all over again on production, this plugin is for you.
*
* Examples:
*
@meredevelopment
meredevelopment / installwp.sh
Last active April 11, 2016 14:42
WP-CLI local dev installer snippet
#!/bin/bash
# Requires WP-CLI. Assumes WP-CLI is in your $PATH.
# Set the default LOC, TITLE, EMAIL, USER & PASSWORD as you like.
# Set the DB user and pass (line 11) to a user that has permissions to create DBs.
# run with ./installwp.sh in most cases.
read -p "Locale? (en_GB): " -e LOC
[ -z "${LOC}" ] && LOC='en_GB'
wp core download --locale=$LOC