Skip to content

Instantly share code, notes, and snippets.

View holyPickleNick's full-sized avatar

Nick holyPickleNick

  • Docupet Inc
  • Kingston, ON
  • 08:00 (UTC -04:00)
View GitHub Profile
@holyPickleNick
holyPickleNick / wp_advanced_search.php
Created July 22, 2017 07:06
WordPress Advanced Search
<?php
function advanced_search_query($query) {
//var_dump( $query );
if( is_home() && ( isset( $_GET['category_name']) || isset( $_GET['search']) ) ) {
error_log( 'woooooo');
@holyPickleNick
holyPickleNick / kl-default.css
Created March 24, 2016 14:09 — forked from avantegarde/kl-default.css
A good starting point for your CSS
/*======================================*
*====== Default CSS | Author: KL ======*
*======================================*/
*,
*:before,
*:after {
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box;
text-rendering: optimizeLegibility;
@holyPickleNick
holyPickleNick / redirect.php
Created February 23, 2016 16:49
Pantheon Redirect Function
$redirects = array(
'/old_url/' => '/new_url/',
'/old_url/' => '/new_url/',
);
if (array_key_exists($_SERVER['REQUEST_URI'], $redirects)) {
header('HTTP/1.0 301 Moved Permanently');
header('Location: ' . $redirects[$_SERVER['REQUEST_URI']]);
exit();
}
/**
* For developers: WordPress debugging mode.
*
* If the default WP_DEBUG function is set to false and
* there are still warnings or errors showing up, try
* using the following instead
*/
ini_set('log_errors','On');
ini_set('display_errors','Off');
ini_set('error_reporting', E_ALL );