This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* WordPress Chosen Taxonomy Metabox | |
* Author: Helen Hou-Sandi | |
* | |
* Use Chosen for a replacement taxonomy metabox in WordPress | |
* Useful for taxonomies that aren't changed much on the fly and are | |
* non-hierarchical in nature, as Chosen is for flat selection only. | |
* You can always use the taxonomy admin screen to add/edit taxonomy terms. | |
* Categories need slightly different treatment from the rest in order to |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$(document).ready(function(){ | |
var width = $(window).width(); | |
var height = $(window).height(); | |
var divs = $('.item'); | |
if (width >= 1200 ){ | |
for(var i = 0; i < divs.length; i+=4) { | |
divs.slice(i, i+4).wrapAll('<div class="row"></div>'); | |
} | |
} else if (width >= 992){ | |
for(var i = 0; i < divs.length; i+=3) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Automated PHP export for Advanced Custom Fields | |
* | |
* Export is initiated whenever an admin publishes a new field group | |
* or saves changes to an existing field group. | |
* | |
* Place this code in your theme's functions.php file. | |
* | |
*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
function name_of_post_type_register() { | |
$labels = array( | |
'name' => _x( 'Post Type Names', 'post type general name' ), | |
'singular_name' => _x( 'Post Type Name', 'post type singular name' ), | |
'add_new' => __( 'Add New' ), | |
'add_new_item' => __( 'Post Type Name' ), | |
'edit_item' => __( 'Edit Post Type Name' ), | |
'new_item' => __( 'New Post Type Name' ), | |
'view_item' => __( 'View Post Type Name' ), |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
function name_of_taxonomy_create() { | |
register_taxonomy( | |
'your_taxonomy_name', | |
array('post_types_here'), | |
array( | |
'label' => __( 'Your Taxonomy Label' ), | |
'rewrite' => array( 'slug' => 'your_taxonomy_name', 'with_front' => false ), | |
'hierarchical' => true, | |
'show_admin_column' => true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* This will update image sizes on save | |
*/ | |
function add_image_options($data){ | |
global $_wp_additional_image_sizes; | |
foreach($_wp_additional_image_sizes as $size => $properties){ | |
update_option($size."_size_w", $properties['width']); | |
update_option($size."_size_h", $properties['height']); | |
update_option($size."_crop", $properties['crop']); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.element { | |
background-image: -webkit-linear-gradient(rgba(0, 0, 0, 0), rgba(0, 0, 0, 0.6)); | |
background-image: -moz-linear-gradient(rgba(0, 0, 0, 0), rgba(0, 0, 0, 0.6)); | |
background-image: -ms-linear-gradient(rgba(0, 0, 0, 0), rgba(0, 0, 0, 0.6)); | |
background-image: -o-linear-gradient(rgba(0, 0, 0, 0), rgba(0, 0, 0, 0.6)); | |
background-image: linear-gradient(rgba(0, 0, 0, 0), rgba(0, 0, 0, 0.6)); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
add_filter ('add_to_cart_redirect', 'woo_redirect_to_checkout'); | |
function woo_redirect_to_checkout() { | |
global $woocommerce; | |
$checkout_url = $woocommerce->cart->get_checkout_url(); | |
return $checkout_url; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
add_filter( 'woocommerce_checkout_fields' , 'woo_remove_billing_checkout_fields' ); | |
/** | |
* Remove unwanted checkout fields | |
* | |
* @return $fields array | |
*/ | |
function woo_remove_billing_checkout_fields( $fields ) { |
OlderNewer