Skip to content

Instantly share code, notes, and snippets.

View starjive's full-sized avatar

starjive starjive

View GitHub Profile
@richtabor
richtabor / starter-content-custom-logo.php
Last active December 10, 2023 22:34
Adding a custom logo to a WordPress theme's starter content.
<?php
/**
* Theme defaults and support for WordPress features.
*/
function prefix_setup() {
/*
* Define starter content for the theme.
* See: https://make.wordpress.org/core/2016/11/30/starter-content-for-themes-in-4-7/
*/
@pro-beaver
pro-beaver / style.css
Created October 10, 2016 13:44
Tilt or Slant text CSS effect
/**
* Add tilt or slant text CSS effect
*
* @author Davinder Singh Kainth
* @link http://probeaver.com/?p=967
*
*/
.tilt-text-left {
@pro-beaver
pro-beaver / style.css
Last active January 15, 2017 14:53
Add click to call Phone button in Beaver Builder
/**
* Add click to call Phone button in Beaver Builder
*
* @author Davinder Singh Kainth
* @link http://probeaver.com/?p=735
*
*/
@pro-beaver
pro-beaver / style.css
Last active January 15, 2017 14:53
Add arrow to menu items with sub-items in Beaver Builder theme
/**
* Add arrow to menu items with sub-items in Beaver Builder theme
*
* @author Davinder Singh Kainth
* @link http://probeaver.com/?p=726
*
*/
.nav li > a:after {
color: inherit;
@mikejolley
mikejolley / gist:2974310
Created June 22, 2012 18:13
WooCommerce - Set default state/country for checkout
/**
* Manipulate default state and countries
*
* As always, code goes in your theme functions.php file
*/
add_filter( 'default_checkout_country', 'change_default_checkout_country' );
add_filter( 'default_checkout_state', 'change_default_checkout_state' );
function change_default_checkout_country() {
return 'XX'; // country code
@hectorcarranza
hectorcarranza / gist:2064037
Created March 17, 2012 18:49
WP - WooCommerce - Notes
///////////////////////////////////////////////////////////////////
// //
// WORDPRESS //
// PLUGIN: WOOCOMMERCE //
// NOTAS SOBRE PROBLEMAS Y SOLUCIONES //
// //
///////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////
@pmgarman
pmgarman / gist:1886509
Created February 22, 2012 18:29
WooCommerce Product Tabs
add_action('woocommerce_product_tabs','tab_name');
add_action('woocommerce_product_tab_panels','tab_panel');
function tab_name() {
echo '<li><a href="#tab-name">Tab Name</a></li>';
}
function tab_panel() {
echo '<div class="panel" id="tab-name">';
echo '<h2>This is a cool tab</h2>';
@mikejolley
mikejolley / gist:1604009
Created January 13, 2012 00:31
WooCommerce - Add a special field to the checkout, order emails and user/order meta
/**
* Add the field to the checkout
**/
add_action('woocommerce_after_order_notes', 'my_custom_checkout_field');
function my_custom_checkout_field( $checkout ) {
echo '<div id="my_custom_checkout_field"><h3>'.__('My Field').'</h3>';
/**