Skip to content

Instantly share code, notes, and snippets.

View chandra10207's full-sized avatar
🏠
Working from home

Chandra Shekhar Pandey chandra10207

🏠
Working from home
View GitHub Profile
@chandra10207
chandra10207 / woocommerce-login-logout-redirects.php
Created August 15, 2017 05:29 — forked from gbot/woocommerce-login-logout-redirects.php
WP: Redirect to home page for WooCommerce login and logout. #ST3
/*----------------------------------------------------------------------------*/
// redirects for login / logout
/*----------------------------------------------------------------------------*/
add_filter('woocommerce_login_redirect', 'login_redirect');
function login_redirect($redirect_to) {
return home_url();
}
<?php
/*
Description: Adds a taxonomy filter in the admin list page for a custom post type.
Written for: http://wordpress.stackexchange.com/posts/582/
By: Mike Schinkel - http://mikeschinkel.com/custom-workpress-plugins
Instructions: Put this code in your theme's functions.php file or inside your own plugin. Edit to suite your post types and taxonomies. Hope this helps...
*/
add_filter('manage_listing_posts_columns', 'add_businesses_column_to_listing_list');
function add_businesses_column_to_listing_list( $posts_columns ) {
if (!isset($posts_columns['author'])) {
@chandra10207
chandra10207 / gist:59e43d6ccf26c67ea7be4ec7a2dd8b42
Created June 23, 2017 04:36 — forked from robdvr/gist:7451695
Adding Bootstrap Forms to WooCommerce
add_filter('woocommerce_billing_fields', 'custom_woocommerce_billing_fields');
function custom_woocommerce_billing_fields( $fields ) {
$fields['billing_address_1']['class'] = array( 'form-group' );
$fields['billing_address_1']['input_class'] = array( 'form-control' );
return $fields;
}