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 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
<html> | |
<head> | |
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.0/jquery.min.js"></script> | |
<!-- Google analytic code will also be placed here --> | |
</head> | |
<body> | |
<iframe id="yoi" src="https://docs.google.com/forms/d/1zaNMci8JTbwwO3bVuXauD-Jaakk5rIULjI8CQIa9Kj8/viewform?embedded=true"; width="760" height="500" frameborder="0" marginheight="0" marginwidth="0">Loading...</iframe> | |
<script type="text/javascript"> | |
(function($){ | |
var cnt = 1; |
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' ); | |
} |
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 | |
/** | |
* A unique identifier is defined to store the options in the database and reference them from the theme. | |
* By default it uses the theme name, in lowercase and without spaces, but this can be changed if needed. | |
* If the identifier changes, it'll appear as if the options have been reset. | |
* | |
*/ | |
function optionsframework_option_name() { |
NewerOlder