Skip to content

Instantly share code, notes, and snippets.

View lukad03's full-sized avatar

Luke Keller lukad03

View GitHub Profile
@lukad03
lukad03 / .gitignore
Created September 10, 2021 17:22
Git Ignore for WordPress
# -----------------------------------------------------------------
# .gitignore for WordPress
# Bare Minimum Git
# http://ironco.de/bare-minimum-git/
# ver 20150227
#
# This file is tailored for a WordPress project
# using the default directory structure
#
# This file specifies intentionally untracked files to ignore
@lukad03
lukad03 / gitconfig
Created April 16, 2018 16:34
Git Aliases
[alias]
co = checkout
st = status
cm = commit
cob = checkout
b = "!git for-each-ref --sort='-authordate' --format='%(authordate)%09%(objectname:short)%09%(refname)' refs/heads | sed -e 's-refs/heads/--'"
d = diff
ds = diff --stat
dc = diff --cached
@lukad03
lukad03 / search_filter.php
Created February 17, 2017 21:18
Wordpress Search Filtering
function prefix_search_filter($query) {
//is_admin check prevents Search Archive in Dashboard from breaking
if (!is_admin() && $query->is_search) {
//Set the Query Options Here, e.g. $query->set('post_type', 'post');
}
return $query;
}
add_filter('pre_get_posts', 'prefix_search_filter');