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 | |
//To add a Size Guide button that opens an image in lightbox based on category (ring or bangle) and if variation size is set -- WooCommerce | |
//Use lightbox of your choice | |
add_action( 'woocommerce_before_add_to_cart_button', 'vg_sizing_placement', 5 ); | |
function vg_sizing_placement() { | |
global $product, $post; |
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 | |
/* | |
* Automatically adding the product to the cart when cart total amount reach to $500. | |
*/ | |
function aapc_add_product_to_cart() { | |
global $woocommerce; | |
$cart_total = 500; |
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
::-webkit-scrollbar-thumb { | |
background: none; | |
} | |
/* left panel back color */ | |
.chat__chat-queue { | |
background-color: #002b36; | |
color: #eee8d5; | |
} |
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 Primary Color option in Site Identity and Remove default Colors menu | |
function your_theme_new_primary_color_settings($wp_customize) { | |
$wp_customize->remove_section( 'colors'); | |
$wp_customize->add_setting('your_color'); | |
$wp_customize->add_control( |
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
/* In this particular instance client wanted to have gradient all over the background and a PNG | |
* image sitting at the bottom of the container | |
* / | |
.selector { | |
background-image: url(/path-to-image.png), -webkit-gradient(linear, left top, left bottom, from(rgba(74,177,253,1)), to(rgba(74,177,253,0.3))); /* For Safari 5.1 to 6.0 */ | |
background-image: url(/path-to-image.png), -o-gradient(linear, left top, left bottom, from(rgba(74,177,253,1)), to(rgba(74,177,253,0.3))); /* For Opera 11.1 to 12.0 */ | |
background-image: url(/path-to-image.png), -moz-gradient(linear, left top, left bottom, from(rgba(74,177,253,1)), to(rgba(74,177,253,0.3))); /* For Firefox 3.6 to 15 */ | |
background-image: url(/path-to-image.png), linear-gradient(linear, left top, left bottom, from(rgba(74,177,253,1)), to(rgba(74,177,253,0.3))); /* Standard syntax (must be last) */ | |
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr="rgba(74,177,253,1)",endColorstr="rgba(74,177,253,0.3)",GradientType=0), progid:DXImageTransform.Microsoft.Alp |
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 | |
/* Whenever the theme style file will update on server, this file version | |
* will automatically update | |
* Ref - https://developer.wordpress.org/reference/functions/wp_enqueue_style/#comment-2056 | |
*/ | |
wp_enqueue_style('main-styles', | |
get_template_directory_uri() . '/css/style.css', | |
array(), |
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 | |
/* | |
To add Infinite Loop Module provided in Jetpack wordpress Plugin, in Genesis driven site. | |
*/ | |
/* | |
Step 1. Install Jetpack Plugin | |
*/ |
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 //don't include this php tag while pasting snippet in your functions.php file | |
//to catch & print first image occuring in post content (the_content) via famous 'catch-that-image' | |
/* we could have also used genesis_get_image() to catch the first image instead of 'catch_that_image' script; | |
but genesis_get_image() was actually catching "first uploaded image" instead of "first image occuring in the_content". | |
*/ | |
add_action('genesis_entry_header','image_above_t',7); //to place image above title | |
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 | |
// To add admin style | |
function load_admin_style() { | |
wp_enqueue_style( 'admin_css', get_template_directory_uri() . '/css/admin-style.css', false, '1.0.0' ); | |
} |
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 //remove this | |
function loop_p_arch_infinite_scroll_render() { | |
$paged = get_query_var( 'paged', 1 ); | |
?> | |
<div id="page-<?=$paged?>"> | |
<?php while( have_posts() ) { | |
the_post(); | |
get_template_part( 'content', 'product' ); | |
} |
NewerOlder