Skip to content

Instantly share code, notes, and snippets.

Patrick Johanneson pjohanneson

Block or report user

Report or block pjohanneson

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@pjohanneson
pjohanneson / functions.php
Created Jan 9, 2019
pre_get_posts sorting on multiple meta keys
View functions.php
add_action( 'pre_get_posts', 'sort_by_lname_then_fname' );
/**
* Sort by last name then first name. `lname` and `fname` are the meta keys.
*
* @param WP_Query $query The query. Passed by reference.
* @return void
* @link https://support.advancedcustomfields.com/forums/topic/pre_get_posts-order-posts-by-two-different-meta_keys-acf-select-field/
*/
function sort_by_lname_then_fname( &$query ) {
if ( $query->is_main_query() && $query->is_post_type_archive( 'speaker' ) ) {
@pjohanneson
pjohanneson / class-generic-plugin-settings.php
Last active Jan 3, 2019
WordPress Settings API quickstart
View class-generic-plugin-settings.php
<?php
/**
* Settings class file.
*
* @package generic-plugin
*/
/**
* Settings class.
*
@pjohanneson
pjohanneson / WCWPG-slides.md
Last active Aug 29, 2015
WordCamp Winnipeg Talks
View WCWPG-slides.md
View Contract Killer 3.md

Contract Killer 3

Revised date: 07/11/2012

Between us [company name] and you [customer name]

Summary:

We’ll always do our best to fulfil your needs and meet your expectations, but it’s important to have things written down so that we both know what’s what, who should do what and when, and what will happen if something goes wrong. In this contract you won’t find any complicated legal terms or long passages of unreadable text. We’ve no desire to trick you into signing something that you might later regret. What we do want is what’s best for both parties, now and in the future.

You can’t perform that action at this time.