Skip to content

Instantly share code, notes, and snippets.

@jmabbas
jmabbas / functions.php
Last active June 9, 2024 08:06
Electro - custom label with price in simple and variable product
//Singel product custom label
function display_regular_price_on_single_product() {
global $product;
if ( ! $product ) {
return;
}
@jmabbas
jmabbas / style.css
Created June 5, 2024 05:24
Geeks - Remove load more in course description
.tutor-toggle-more-content.tutor-toggle-more-collapsed {
height: auto !important;
}
.tutor-btn.tutor-btn-ghost,
.tutor-toggle-more-collapsed:before {
display: none;
}
@jmabbas
jmabbas / style.css
Created June 4, 2024 06:18
Electro - custom color change
.features-list .media-left i,
.footer-call-us .call-us-icon i,
.footer-v2 .handheld-footer .handheld-footer-bar .footer-call-us .call-us-text span,
.handheld-footer .handheld-footer-bar .footer-call-us .call-us-text span,
.header-support-info .support-icon i,
.header-support-inner .support-icon,
.header-v13 .off-canvas-navigation-wrapper .navbar-toggler:hover,
.header-v13 .off-canvas-navigation-wrapper button:hover,
.header-v13 .off-canvas-navigation-wrapper.toggled .navbar-toggler:hover,
.header-v13 .off-canvas-navigation-wrapper.toggled button:hover,
@jmabbas
jmabbas / functions.php
Created May 30, 2024 17:52
Electro - Custom field with label
function display_regular_price_on_single_product() {
global $product;
if ( ! $product ) {
return;
}
$regular_price = $product->get_regular_price();
echo '<span class="regular-price">' . wc_price( $regular_price ) . '</span>';
}
@jmabbas
jmabbas / functions.php
Created May 29, 2024 08:14
Electro - Mobile custom image Logo link
function redux_apply_handheld_header_logo( $logo ) {
global $electro_options;
$logo_image_src = '';
if ( ! empty( $electro_options['handheld_header_logo']['url'] ) ) {
$logo_image_attr = $electro_options['handheld_header_logo'];
$logo_image_src = $electro_options['handheld_header_logo']['url'];
} elseif ( ! empty( $electro_options['site_header_logo']['url'] ) ) {
$logo_image_attr = $electro_options['site_header_logo'];
$logo_image_src = $electro_options['site_header_logo']['url'];
@jmabbas
jmabbas / style.css
Last active May 28, 2024 11:11
Electro - Footer newsletter in mobile.
@media (max-width: 767px) {
.desktop-footer.d-none.d-lg-block.container {
display: block !important;
}
.desktop-footer .footer-widgets,
.desktop-footer .footer-bottom-widgets,
.desktop-footer .copyright-bar {
display: none;
}
@jmabbas
jmabbas / functions.php
Created May 22, 2024 08:18
Electro - Mobile custom Logo link
function electro_handheld_header_logo() {
electro_header_dark_logo( 'header-logo' );
ob_start();
?>
<div class="header-logo">
<a href="https://www.nagata-ss.co.jp/" class="header-logo-link">
<img src="https://products.nagata-ss.co.jp/wp-content/uploads/2022/10/cropped-株式会社ナガタCMYK-.png" alt="商品情報-(株)永田製作所/(株)ナガタ" class="img-header-logo" width="190" height="39">
</a>
@jmabbas
jmabbas / functions.php
Created May 21, 2024 04:48
Cartzilla - Footer Logo
function cartzilla_get_footer_logo() {
$logo_id = (int) get_theme_mod( 'footer_logo' );
$footer_custom_logo_id = apply_filters( 'cartzilla_custom_footer_logo', '');
if ( !empty ($footer_custom_logo_id)) {
$footer_custom_logo_attr = [
'class' => 'footer-logo',
];
// If the logo alt attribute is empty, get the site title
@jmabbas
jmabbas / style.css
Created May 17, 2024 12:39
MyTravel - Make list view ad default
.post-type-archive-product .u-slick__tab div#list-view {
display: block !important;
height: auto !important;
opacity: 1;
}
.post-type-archive-product div#grid-view {
display: none;
}
@jmabbas
jmabbas / style.css
Created May 13, 2024 04:34
Electro - Single product background png image on hover
.woocommerce-product-gallery__wrapper:hover a img {
opacity: 0;
}