Skip to content

Instantly share code, notes, and snippets.

@ajithrn
ajithrn / export.sql
Created December 2, 2016 20:23 — forked from jonahcoyote/export.sql
Sabai Directory Export SQL
/*
Intro:
Here are some export examples you can use to export Sabai directory data. I'm no MySQL expert and there's probably better ways to run these queries but this worked for my purposes. I hope this helps!
Note, this is going to export all columns and you'll need to manually go in and remove columns you don't need in Excel or Numbers or whatever spreadsheet program you have.
Usage:
This is meant to be run in phpMyAdmin. Look at your own table structure and modify as necessary for any custom fields, table prefix, and custom bundle. Custom fields are storedin their own tables and cross linked via entity_id which is the id of a listing.
*/
@ajithrn
ajithrn / woo-item.php
Last active August 29, 2015 14:18 — forked from mikejolley/gist:2044101
Wordpress: Woocommerce items in cart and total
/**
* items to display total number of items and cost
* ref: https://gist.github.com/mikejolley/2044101
*/
<a class="cart-contents"
href="<?php echo WC()->cart->get_cart_url(); ?>" title="<?php _e( 'View your shopping cart' ); ?>"><?php echo sprintf (_n( '%d item', '%d items', WC()->cart->cart_contents_count ), WC()->cart->cart_contents_count ); ?> - <?php echo WC()->cart->get_cart_total(); ?></a>
@ajithrn
ajithrn / box-shadow.html
Last active August 29, 2015 14:16 — forked from ocean90/box-shadow.html
CSS: box-shadows
<!DOCTYPE html>
<html>
<head>
<title>Box Shadow</title>
<style>
.box {
height: 150px;
width: 300px;
margin: 20px;
<?php
/*-----------------------------------------------------------------------------------*/
/* Conditional Logic to Detect Various Event Related Views/Pages
/*-----------------------------------------------------------------------------------*/
if( tribe_is_month() && !is_tax() ) { // Month View Page
echo 'were on the month view page';
} elseif( tribe_is_month() && is_tax() ) { // Month View Category Page
/**
* Optimize WooCommerce Scripts
* Remove WooCommerce Generator tag, styles, and scripts from non WooCommerce pages.
*/
add_action( 'wp_enqueue_scripts', 'child_manage_woocommerce_styles', 99 );
function child_manage_woocommerce_styles() {
//remove generator meta tag
remove_action( 'wp_head', array( $GLOBALS['woocommerce'], 'generator' ) );
@ajithrn
ajithrn / gravity-forms_bootstrap.css
Last active March 1, 2017 14:36 — forked from DevinWalker/gravity-forms_bootstrap
Wordpress: GForm Bootstrap
/* ------------------------------------
Gravity Forms
---------------------------------------*/
.gform_wrapper ul { padding-left: 0; list-style: none }
.gform_wrapper li { margin-bottom: 15px }
.gform_wrapper form { margin-bottom: 0 }