Skip to content

Instantly share code, notes, and snippets.

@jmabbas
jmabbas / functions.php
Created September 23, 2024 14:00
Finder - Login singup popup
function finder_header_user_signup_form() {
if ( ! finder_is_hivepress_activated() ) {
return;
}
$is_dark_header = finder_is_header_navbar_dark();
$default = apply_filters( 'finder_default_signup_title', 'Join Finder.<br>Get premium benefits:' );
$signup_title = get_theme_mod( 'finder_signup_title', $default );
$signup_image = get_theme_mod( 'finder_signup_image_option' );
@jmabbas
jmabbas / functions.php
Last active September 23, 2024 08:27
WooCommerce - Tittle h3 change to other page except category page
function woocommerce_template_loop_product_title() {
if ( is_product_category() ) {
echo wp_kses_post( '<h3 class="woocommerce-loop-product__title">' . get_the_title() . '</h3>' ); //only load category page
} else {
echo wp_kses_post( '<div class="woocommerce-loop-product__title">' . get_the_title() . '</div>' ); //load all pages
}
}
@jmabbas
jmabbas / functions.php
Created September 19, 2024 13:33
Teachmarket - Default WooCommerce related product.
add_action( 'init', 'tm_child_place_rel_products_above_wc_tabs', 30 );
function tm_child_place_rel_products_above_wc_tabs() {
remove_action( 'woocommerce_after_single_product_summary', 'techmarket_related_display', 15 );
add_action( 'woocommerce_after_single_product_summary', 'woocommerce_output_related_products', 15 );
}
@jmabbas
jmabbas / functions.php
Created September 18, 2024 05:54
Vodi - Remove movies catalog order
function vodi_movies_control_bar_top_right() {
?><div class="vodi-control-bar__right"><?php
vodi_movies_view_switcher();
?></div><?php
}
@jmabbas
jmabbas / functions.php
Created September 18, 2024 05:54
Vodi - Remove TV Show order
function vodi_tv_shows_control_bar_top_right() {
?><div class="vodi-control-bar__right"><?php
vodi_tv_shows_view_switcher();
?></div><?php
}
@jmabbas
jmabbas / functions.php
Created September 9, 2024 12:58
Vodi - Social links in header v2
add_action( 'vodi_header_v2', 'vodi_footer_top_bar_social', 71 );
@jmabbas
jmabbas / functions.php
Created September 6, 2024 06:29
MyTravel - My account icon after header cart
function mytravel_navbar_mini_cart() {
if ( mytravel_is_woocommerce_activated() && mytravel_navbar_enable_minicart() ) {
$header_style = mytravel_get_header_style();
$classes = 'shopping-cart position-relative';
if ( 'v1' === $header_style ) {
$classes .= ' pl-2 pl-md-4 ml-auto d-none d-xl-block';
} elseif ( 'v2' === $header_style ) {
@jmabbas
jmabbas / functions.php
Created September 4, 2024 07:48
WooCommerce Html load in product short description
function filter_post_excerpt_attrs( $metadata ) {
if ( 'core/post-excerpt' === $metadata['name'] ) {
$metadata["attributes"]["excerptLength"] = false;
}
return $metadata;
};
add_filter( 'block_type_metadata', 'filter_post_excerpt_attrs', 10 );
@jmabbas
jmabbas / functions.php
Created September 4, 2024 06:36
MAS Videos - movies description change
add_filter( 'masvideos_register_post_type_movie', 'mas_child_change_movies_descrioption', 98 );
function mas_child_change_movies_descrioption( $args ) {
$args['description'] = 'This is where you can add new movies to your site.';
return $args;
}
@jmabbas
jmabbas / functions.php
Created September 3, 2024 06:56
Electro - Footer newsletter margin stying
.footer-newsletter div.wpforms-container-full,
.footer-newsletter div.wpforms-container-full .wpforms-form .wpforms-submit-container {
margin: 0 !important;
}