Skip to content

Instantly share code, notes, and snippets.

@pixelcutlabs
pixelcutlabs / functions.php
Created December 30, 2016 00:46
Add a new sorting option to FacetWP dropdown
<?php
function register_package_id_default_search_option( $options, $params ) { //We use this section of code (from line 2 to 12) to set up a function but not to use it
$options['package_id'] = array( //where package_id is the sorting option Identifier
'label' => 'Package ID', //This outputs to the user on the frontend in the FacetWP sorting options dropdown
'query_args' => array( //This is how you build a "search" in the SQL database for a specific argument or set of rules
'orderby' => 'meta_value_num', // this tells FacetWP that we're looking at the number value of the meta key defined on the next line
'meta_key' => '_package_id', // this is the identifier of the custom field we're sorting by
'order' => 'DESC', // this makes the highest number come first in results
)
);
@pixelcutlabs
pixelcutlabs / .gitignore
Created November 1, 2016 19:01 — forked from salcode/.gitignore
.gitignore file for WordPress - Bare Minimum Git
# -----------------------------------------------------------------
# .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
@pixelcutlabs
pixelcutlabs / rule-of-thubm.txt
Created October 9, 2016 21:08
Rule of Thumb - Server RAM to WordPress installation ratio
([Number of WordPress Instals "X"] * [Install Ram Requirement: 75mb]) + [Operating System Memory = 200mb]
@pixelcutlabs
pixelcutlabs / .gitignore
Created October 1, 2016 22:16
WordPress Bare Minimum Git
# -----------------------------------------------------------------
# .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
@pixelcutlabs
pixelcutlabs / app.coffee
Created September 24, 2016 02:34
webroot/wp-content/themes/listify/inc/integrations/wp-job-manager/js/map/app.coffee
class MapView extends Backbone.View
bounds: new google.maps.LatLngBounds()
infobubble: new InfoBubble(
backgroundClassName: 'map-marker-info',
borderRadius: 4,
padding: 15,
borderColor: '#ffffff',
shadowStyle: 0,
minHeight: 115,
maxHeight: 115,