Skip to content

Instantly share code, notes, and snippets.

function mytravel_wc_product_page_title() {
$total = wc_get_loop_prop( 'total' );
if ( is_shop() || is_product_category() || is_tax( 'product_label' ) || is_tax( get_object_taxonomies( 'product' ) ) ) {
$page_title = woocommerce_page_title( false );
$title = str_replace( 'product-format-', '', $page_title );
} else {
$title = get_the_title();
}
?>
@jmabbas
jmabbas / style.css
Created January 16, 2026 09:27
Electro - Mobile icons color
.handheld-header-v2 .handheld-header-links>ul li>a::before,
.handheld-header-v2 .handheld-header-links i,
button.navbar-toggler.navbar-toggle-hamburger i {
color: #fff;
}
@jmabbas
jmabbas / functions.php
Created January 14, 2026 11:11
MyTravel - Product title h2 to h3
function woocommerce_template_loop_product_title() {
echo '<h3 class="' . esc_attr( apply_filters( 'woocommerce_product_loop_title_classes', 'woocommerce-loop-product__title' ) ) . '">' . get_the_title() . '</h3>'; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
}
@jmabbas
jmabbas / style.css
Created January 12, 2026 07:41
Electro - Custom styles
@media (max-width: 767.98px) {
.deal-products-carousel {
margin-bottom: 0;
padding-bottom: 10px;
}
}
@jmabbas
jmabbas / functions.php
Created January 9, 2026 12:27
Mytravel - category page Category title on h1 tag
function mytravel_output_archive_wrapper() {
$sidebar = mytravel_get_archive_sidebar();
if ( ! class_exists( 'MAS_Travels' ) ) {
if ( is_product() ) {
$full_width_class = ' col-xl-9 mx-auto pb-5 pb-lg-0';
} else {
$full_width_class = ' col-lg-12 col-xl-12 order-1 order-lg-2 pb-5 pb-lg-0';
}
} else {
$full_width_class = ' col-lg-12 col-xl-12 order-1 order-lg-2 pb-5 pb-lg-0';
@jmabbas
jmabbas / functions.php
Created January 9, 2026 07:07
Cartzilla - Move WooCommerce notice after main
add_action( 'after_setup_theme', function() {
remove_action( 'cartzilla_footer_after', 'woocommerce_output_all_notices', 100 );
add_action( 'cartzilla_footer_before', 'woocommerce_output_all_notices', 100 );
});
@jmabbas
jmabbas / style.css
Created January 9, 2026 05:50
Freshcart - custom
ul.wp-block-navigation__submenu-container.has-text-color.has-secondary-color.has-background.has-white-background-color.wp-block-navigation-submenu > li {
border-radius: 10px;
}
header .wp-block-group.navigation-bar.has-global-padding.is-layout-constrained.wp-block-group-is-layout-constrained {
position: static;
}
@jmabbas
jmabbas / functions.php
Created January 6, 2026 14:10
Electro - Home v5 category block order
add_filter( 'get_terms', 'electro_preserve_category_slug_order', 10, 4 );
function electro_preserve_category_slug_order( $terms, $taxonomies, $args, $term_query ) {
if (
is_admin()
|| empty( $args['include'] )
|| ! in_array( 'product_cat', (array) $taxonomies, true )
) {
return $terms;
}
@jmabbas
jmabbas / functions.php
Created January 6, 2026 12:23
Vodi - Single movie v6 related posts
function vodi_toggle_single_movie_hooks() {
$style = vodi_get_single_movie_style();
if ( $style !== 'v4' && $style !== 'v3' ) {
add_action( 'masvideos_before_single_movie_summary', 'vodi_template_single_movie_player_container_wrap_open', 1 );
add_action( 'masvideos_after_single_movie_summary', 'vodi_template_single_movie_player_container_wrap_close', 10 );
}
if( $style === 'v7' ) {
remove_filter( 'masvideos_related_movies_default_args', 'vodi_related_movies_default_args' );
@jmabbas
jmabbas / functions.php
Created January 6, 2026 05:46
Electro - Product id in single product description meta
add_action( 'woocommerce_product_meta_start', 'add_product_id_to_single_meta' );
function add_product_id_to_single_meta() {
global $product;
if ( ! $product ) {
return;
}
echo '<span class="product-id">Product ID: ' . esc_html( $product->get_id() ) . '</span>';
}