Skip to content

Instantly share code, notes, and snippets.

@jmabbas
jmabbas / functions.php
Created February 18, 2026 11:19
Mytravel - Tour features
function mytravel_tour_info() {
if ( ! mytravel_is_acf_activated() ) {
return;
}
$days = mytravel_get_field( 'days' );
$total_people = mytravel_get_field( 'max_people' );
$min_age = mytravel_get_field( 'min_age' );
$tour_schedule = mytravel_get_field( 'tour_period' );
$amenities = mytravel_get_field( 'snapshot' );
@jmabbas
jmabbas / functions.php
Last active February 18, 2026 10:53
Electro - Single product load SKU instead of wishlist
function electro_loop_action_buttons() {
?><div class="action-buttons"><?php
electro_template_loop_product_sku();
?></div><?php
}
@jmabbas
jmabbas / style.css
Created February 18, 2026 06:48
Electro - Custom chagnes
@media(max-width:767px) {
.atc-wrap {
position: fixed;
z-index: 1080;
right: auto;
bottom: 10px;
left: 16%;
background-color: #fff;
width: 100%;
}
@jmabbas
jmabbas / style.css
Created February 17, 2026 10:54
Electro - Enable variation stock
.single-product .woocommerce-variation-availability p.stock {
display: block;
}
.single-product .product-type-variable .availability {
display: none;
}
@jmabbas
jmabbas / functions.php
Last active February 16, 2026 12:19
Furnique - Load tab view on single product tabs
add_action('wp_footer', function () {
if ( ! is_product() ) return;
?>
<script>
jQuery(document).ready(function($){
const $tabsWrapper = $('.woocommerce-tabs');
const $tabsList = $tabsWrapper.find('ul.tabs');
$('.woocommerce-Tabs-panel > li[role="presentation"]').each(function(){
@jmabbas
jmabbas / style.css
Created February 16, 2026 10:19
Furnique - Single product description style
.woocommerce-Tabs-panel--description .alignleft {
float: left;
margin: 0.5em 1em 0.5em 0;
}
@jmabbas
jmabbas / style.css
Created February 16, 2026 09:04
Electro - Single product tabs customize
add_filter( 'woocommerce_product_tabs', 'woo_reorder_tabs', 98 );
function woo_reorder_tabs( $tabs ) {
if ( isset( $tabs['reviews'] ) ) {
$tabs['reviews']['priority'] = 25;
}
if ( isset( $tabs['accessories'] ) ) {
$tabs['accessories']['priority'] = 30;
}
@jmabbas
jmabbas / style.css
Created February 16, 2026 08:12
Hellix - Off-canvas styles
.sidebar.js-sidebar .widget_nav_menu li a {
color: inherit;
font-size: inherit;
}
.sidebar {
background-color: #18130c;
background-image: url(assets/img/general/pattern_bg.png);
}
@jmabbas
jmabbas / style.css
Last active February 12, 2026 14:37
Furnique - Make single product gallery image small
@media (min-width: 1200px) {
div[data-block-name="woocommerce/product-image-gallery"] .flex-control-thumbs {
grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
}
}
.woocommerce-product-gallery img.flex-active {
border: 1px solid #000;
box-sizing: border-box;
}
@jmabbas
jmabbas / functions.php
Last active February 10, 2026 06:19
Vodi - TV show short description on loop
//TV show excerpt on TV show loop
function masvideos_template_loop_tv_show_body_close() {
global $post;
$short_description = apply_filters( 'masvideos_template_loop_tv_show_short_desc', $post->post_excerpt );
?><div class="loop-short-desc-custom" style=" height: 95px; overflow: hidden; margin-bottom: 20px; ">
<?php echo $short_description; ?>
</div>