Skip to content

Instantly share code, notes, and snippets.

@whitesided
whitesided / custom-search-acf-wordpress.php
Last active July 7, 2022 16:46 — forked from charleslouis/custom-search-acf-wordpress.php
PHP - Wordpress - Search - wordpress custom search function that encompasses ACF/advanced custom fields and taxonomies and split expression before request
<?php
/**
* [list_searcheable_acf list all the custom fields we want to include in our search query]
* @return [array] [list of custom fields]
*/
function list_searcheable_acf(){
$list_searcheable_acf = array("title", "sub_title", "excerpt_short", "excerpt_long", "xyz", "myACF");
return $list_searcheable_acf;
}
@whitesided
whitesided / examples.php
Created June 23, 2022 21:00 — forked from kingkool68/examples.php
Helper functions to make generating WordPress post type labels and taxonomy labels easier
<?php
// Register a Book post type
$args = array(
'labels' => generate_post_type_labels( 'book', 'books' ),
'public' => true,
'publicly_queryable' => true,
'show_ui' => true,
'show_in_menu' => true,
'query_var' => true,
@whitesided
whitesided / Automating the Scalzi Nope.md
Last active August 29, 2015 14:16
Automating the Scalzi "Standard Responses to Online Stupidity"

I thought [John Scalzi's proposed list of responses to online stupidity] (http://whatever.scalzi.com/2015/03/02/standard-responses-to-online-stupidity/) were good but the prosepct of typing them in every time, or copying and pasting them from his site? Fuggedaboutit.

So why not turn to what was meant for this sort of thing? Textexpander! Just create a vanilla snippet and use the popup menu code to make it easy to pick from the list. It's pretty simple to format things this way but I saved you the trouble.

Just copy and paste the (long) line below into a new text expander snippet, plain text style. Assign whatever shortcut you like. I used scalzinope since I already had a nope snippet, but whatever floats your boat.

%fillpopup:name=NopeChoice:default=I don’t care what you think.:I didn’t ask you.:No doubt you thought that was terribly clever.:You’ve attempted logic. Not all attempts succeed.:One should not have that many errors in that few characters.:Either your educators have failed you, or you have f

Keybase proof

I hereby claim:

  • I am whitesided on github.
  • I am whiteside (https://keybase.io/whiteside) on keybase.
  • I have a public key ASCEJf4q3rcB6ucnJlGwsScvySoCVP8rd9in7GqVSM15Two

To claim this, I am signing this object: