Skip to content

Instantly share code, notes, and snippets.

@akther80
akther80 / style.css
Last active September 4, 2019 18:11
Vodi - Boxed layout
@media (min-width: 1200px) {
body {
background-color: #ebebeb;
}
#page {
width: 1200px;
margin: 0 auto;
overflow: hidden;
background: #fff;
@akther80
akther80 / style.css
Last active March 9, 2020 11:32
Vodi -Custom Color
a,
form.comment-form .logged-in-as a,
.comment-respond .comment-reply-title a:hover,
.vodi-related-articles .header-aside a:hover,
.home-section__flex-header ul.nav li a.active,
.home-section__flex-header ul.nav li a:hover,
.section-featured-tv-show .featured-tv-show__content .nav-link:hover,
.section-featured-tv-show .featured-tv-show__content .nav-link.active,
.home-section .home-section__nav-header .nav-link:hover,
.home-section .home-section__nav-header .nav-link.active,
@akther80
akther80 / functions.php
Created March 16, 2020 07:51
Front - Payment method in sidebar Using woocommerce-germanized/
if ( class_exists( 'WooCommerce_Germanized' ) ) :
function woocommerce_checkout_before_order_review() {
remove_action( 'woocommerce_checkout_order_review', 'woocommerce_order_review', 20 );
remove_action( 'woocommerce_checkout_order_review', 'woocommerce_checkout_payment', 10 );
remove_action( 'woocommerce_checkout_after_customer_details', 'woocommerce_checkout_payment', 10 );
add_action( 'woocommerce_checkout_order_review', 'woocommerce_order_review', 10 );
add_action( 'woocommerce_checkout_order_review', 'woocommerce_checkout_payment', 20 );
}
add_action( 'init', 'woocommerce_checkout_before_order_review', 10 );
@akther80
akther80 / style.css
Created April 27, 2020 12:04
Electro - WPforms Integration for RTL
.rtl div.wpforms-container-full.ec-newsletter-form .wpforms-form input[type=email] {
border-top-left-radius: 0;
border-bottom-left-radius: 0;
border-top-right-radius: 1.571em;
border-bottom-right-radius: 1.571em;
}
.rtl div.wpforms-container-full.ec-newsletter-form .wpforms-form input[type=submit],
.rtl div.wpforms-container-full.ec-newsletter-form .wpforms-form button[type=submit] {
border-top-left-radius: 1.571em;
@akther80
akther80 / theme.js
Created June 8, 2020 09:17
Cartzilla - Sticky Single Product Sidebar
$(document).scroll(function() {
var y = $(document).scrollTop(), //get page y value
header = $(".product-summary aside");
if(y >= 300 && ( $(window).width() >= 1366 ) ) {
header.css({position: "fixed", "top" : "0", "right" : "0"});
} else {
header.css({position: "relative","top" : "0", "right" : "0"});
}
});
@akther80
akther80 / style.css
Created June 16, 2020 07:43
Cartzilla - Change single product thumbnail image width
.cz-gallery .woocommerce-product-gallery .flex-control-thumbs li img {
width: 80px;
}
.cz-gallery .woocommerce-product-gallery .flex-control-thumbs li {
flex: initial;
max-width: initial;
}
.cz-gallery .woocommerce-product-gallery .flex-control-thumbs {
@akther80
akther80 / style.css
Created June 29, 2020 11:34
Cartzilla- Woocommerce product title in a single line
.product-title {
white-space: nowrap;
text-overflow: ellipsis;
overflow: hidden;
}
@akther80
akther80 / style.css
Created June 29, 2020 13:51
Cartzilla- Cart update and Cart empty box style
.woocommerce-cart .woocommerce-notices-wrapper:not(:empty) .woocommerce-message {
position: relative;
padding: 0.75rem 1.25rem;
margin-bottom: 1rem;
border: 1px solid transparent;
border-radius: 0.4375rem;
display: block;
color: #3dc58b;
background-color: #f0fcf7;
border-color: #d2f5e6;
@akther80
akther80 / functions.php
Created June 29, 2020 15:44
Cartzilla- Shop sidebar for single product
add_action( 'init', 'cz_child_enable_single_product_sidebar', 10 );
function cz_child_enable_single_product_sidebar() {
remove_action( 'template_redirect', 'cartzilla_wc_product_remove_sidebar' );
add_action( 'woocommerce_before_single_product', 'cartzilla_wc_before_content', 7 );
add_action( 'woocommerce_before_single_product', 'cartzilla_wc_before_single_product', 10 );
add_action( 'woocommerce_after_single_product', 'cartzilla_wc_after_single_product', 350 );
add_action( 'woocommerce_sidebar', 'cartzilla_wc_after_content', 20 );
add_action( 'cartzilla_handheld_toolbar', 'cartzilla_wc_single_product_handheld_toolbar_toggle_shop_sidebar', 30 );
}
@akther80
akther80 / function.php
Last active July 6, 2020 10:35
Cartzilla- Different header for catalog and product page
if( ! function_exists( 'cartzilla_custom_header_layout' ) ) {
function cartzilla_custom_header_layout( $layout ) {
if ( is_shop() || is_product_taxonomy() || is_product_category() || is_product_tag() ) {
$layout = '1-level-light';
} elseif ( is_product()) {
$layout = 'electronics-store';
}
return $layout;
}