Skip to content

Instantly share code, notes, and snippets.

View melaniedunford's full-sized avatar

Melanie melaniedunford

View GitHub Profile
~r~ = Red
~b~ = Blue
~g~ = Green
~y~ = Yellow
~p~ = Purple
~o~ = Orange
~c~ = Grey?
~m~ = Darker Grey
~u~ = Black
~n~ = New Line
@melaniedunford
melaniedunford / wordpress-list-users.sql
Created August 26, 2020 22:37 — forked from petenelson/wordpress-list-users.sql
WordPress: MySQL query to list user names, emails, and first & last name
SELECT wp_users.user_login, wp_users.user_email, firstmeta.meta_value as first_name, lastmeta.meta_value as last_name FROM wp_users left join wp_usermeta as firstmeta on wp_users.ID = firstmeta.user_id and firstmeta.meta_key = 'first_name' left join wp_usermeta as lastmeta on wp_users.ID = lastmeta.user_id and lastmeta.meta_key = 'last_name'
@melaniedunford
melaniedunford / README.md
Created September 12, 2018 05:52 — forked from hofmannsven/README.md
Storing WordPress files and database with WP-CLI on the server.
@melaniedunford
melaniedunford / woocommerce-export-product-attributes-and-categories
Created November 1, 2017 21:51 — forked from haroldkyle/woocommerce-export-product-attributes-and-categories
This SQL script allows us to export woocommerce items (both single products and variable products) alongside their attributes and parent>child product categories. You can change values in the mapped parent categories ('Cards' or 'pa_attribute_cards' etc in my case) to suit your need. I wrote this to facilitate importing of woocommerce items into…
select distinct
# uncomment these rows for debugging
# p.ID,
# v.ID,
if( isnull(vm_sku.meta_value), pm_sku.meta_value, vm_sku.meta_value ) as 'sku',
p.post_title,
# need to cast prices to decimal because the datatype is not enforced otherwise
@melaniedunford
melaniedunford / wordpress-remove-seo-columns.php
Created September 30, 2017 16:18 — forked from chuckreynolds/wordpress-remove-seo-columns.php
remove WordPress SEO columns from admin post tables
<?php
function rkv_remove_columns( $columns ) {
// remove the Yoast SEO columns
unset( $columns['wpseo-score'] );
unset( $columns['wpseo-title'] );
unset( $columns['wpseo-metadesc'] );
unset( $columns['wpseo-focuskw'] );
@melaniedunford
melaniedunford / norcross-debug-functions.php
Created September 30, 2017 16:15 — forked from norcross/norcross-debug-functions.php
my list of debugging functions to keep in an MU file
<?php
/*
Plugin Name: Norcross Debug Functions
Plugin URI: https://gist.github.com/norcross/7864205/
Description: A set of functions I use on all sites while building
Author: Andrew Norcross
Version: 0.0.1
Requires at least: 3.0
Author URI: http://andrewnorcross.com
*/