Home › Forums › WoodMart support forum › change the title of the product in wd-sticky panel
change the title of the product in wd-sticky panel
- This topic has 10 replies, 3 voices, and was last updated 2 years, 3 months ago by
Elise Noromit.
-
AuthorPosts
-
October 2, 2022 at 5:49 pm #409803
loraloraParticipantHello
1. How to change the title of the product, at the bottom of the floating menu.?
Now it has “H4”. I need to change it to “div”<div class="wd-sticky-btn-info woodmart-sticky-btn-info"> <h4 class="wd-entities-title"></h4> </div>
How can I do it in code?
How can I change this using a child theme?2. is there a solution, on the pages of “archives” and “taxonomies” to change the title of the products from H3 to div?
How can I do it in code?
How can I change this using a child theme?Thanks
October 3, 2022 at 6:41 pm #410090
Elise NoromitMemberHello,
Please check this file: inc/integrations/woocommerce/template-tags.php and find this functions:
woodmart_sticky_single_add_to_cart
Copy this function to the functions.php of the child theme and edit it as per your needs:
if ( ! function_exists( 'woocommerce_template_loop_product_title' ) ) { function woocommerce_template_loop_product_title() { echo '<div class="wd-entities-title"><a href="' . get_the_permalink() . '">' . get_the_title() . '</a></div>'; } }
If you have any questions please feel free to contact us.
Best Regards
October 6, 2022 at 1:43 pm #411265
Cal.97ParticipantHello,
I would like the H4 tag to be replaced by a p tag.
I tried this solution:if ( ! function_exists( ‘woocommerce_template_loop_product_title’ ) ) {
function woocommerce_template_loop_product_title() {
echo ‘<p class=”wd-entities-title”>’ . get_the_title() . ‘</p>’;
}
}But it doesn’t work.
Could you help me?October 6, 2022 at 7:11 pm #411445
loraloraParticipantI, like the interlocutor above, also tried to insert a function into function.php – and it does not work. Is it possible that some action needs to be added?
At the expense of redefining the inc/integrations/woocommerce/template-tags.php file.
Can I make changes to this file by first placing it in mytheme/woocommerce/template-tags.php.? Will it work?October 8, 2022 at 2:53 am #411923
Elise NoromitMemberHello,
Please insert the site admin access into the Private content below the message area. We will check the reason this function does not work:
woocommerce_template_loop_product_title
You do not need copy the whole file:
inc/integrations/woocommerce/template-tags.phpYou just need to copy the function and insert it into the functions.php of the child theme.
Best Regards
November 4, 2022 at 7:34 pm #418770
loraloraParticipantok please check
November 8, 2022 at 1:58 am #419398
Elise NoromitMemberHello,
Our developers have checked and see everything works: https://monosnap.com/file/xuZc1Q9yHCyljYJisLVm6tgYJ5TqCq and https://monosnap.com/file/GTuIvSTlYAVAvecLJugurUD2oF2B8P
Please clarify the issue.
Best Regards
November 8, 2022 at 4:06 pm #419585
loraloraParticipantHello
Sorry, but you didn’t check that.
we talked about the sticky card in the product.Attachments:
You must be logged in to view attached files.November 10, 2022 at 3:07 am #419965
Elise NoromitMemberHello,
Please add this code to the functions.php of the child theme:
if ( ! function_exists( 'woodmart_sticky_single_add_to_cart' ) ) { function woodmart_sticky_single_add_to_cart() { global $product; if ( ! woodmart_woocommerce_installed() || ! is_product() || ! woodmart_get_opt( 'single_sticky_add_to_cart' ) ) { return; } woodmart_enqueue_js_script( 'sticky-add-to-cart' ); woodmart_enqueue_inline_style( 'sticky-add-to-cart' ); if ( woodmart_get_opt( 'mobile_single_sticky_add_to_cart' ) ) { woodmart_enqueue_inline_style( 'woo-mod-quantity-overlap' ); } ?> <div class="wd-sticky-btn<?php echo woodmart_get_old_classes( ' woodmart-sticky-btn' ); ?>"> <div class="wd-sticky-btn-container container<?php echo woodmart_get_old_classes( ' woodmart-sticky-btn-container' ); ?>"> <div class="wd-sticky-btn-content<?php echo woodmart_get_old_classes( ' woodmart-sticky-btn-content' ); ?>"> <div class="wd-sticky-btn-thumbnail<?php echo woodmart_get_old_classes( ' woodmart-sticky-btn-thumbnail' ); ?>"> <?php echo woocommerce_get_product_thumbnail(); ?> </div> <div class="wd-sticky-btn-info<?php echo woodmart_get_old_classes( ' woodmart-sticky-btn-info' ); ?>"> <div class="wd-entities-title"><?php the_title(); ?></div> <?php echo wc_get_rating_html( $product->get_average_rating() ); ?> </div> </div> <div class="wd-sticky-btn-cart<?php echo woodmart_get_old_classes( ' woodmart-sticky-btn-cart' ); ?>"> <span class="price"><?php echo wp_kses_post( $product->get_price_html() ); ?></span> <?php if ( $product->is_type( 'simple' ) ) : ?> <?php woocommerce_simple_add_to_cart(); ?> <?php else : ?> <a href="<?php echo esc_url( $product->add_to_cart_url() ); ?>" class="wd-sticky-add-to-cart button alt<?php echo woodmart_get_old_classes( ' woodmart-sticky-add-to-cart' ); ?>"> <?php echo true == $product->is_type( 'variable' ) ? esc_html__( 'Select options', 'woodmart' ) : $product->single_add_to_cart_text(); ?> </a> <?php Quick_Buy::get_instance()->output_quick_buy_button(); ?> <?php endif; ?> <?php do_action( 'woodmart_sticky_atc_actions' ); ?> </div> </div> </div> <?php } add_action( 'woodmart_before_wp_footer', 'woodmart_sticky_single_add_to_cart', 999 ); }
Best Regards
November 14, 2022 at 6:19 pm #421044
loraloraParticipantThis code breaks the product page
Is there another solution?November 16, 2022 at 3:53 am #421414
Elise NoromitMemberHello,
Please provide the detailed steps with the screens to see want is wrong.
Best Regard s
-
AuthorPosts
- You must be logged in to create new topics. Login / Register