Product buttom
Support Forums › Kampina › Product buttom
- This topic has 14 replies, 2 voices, and was last updated 3 months, 1 week ago by
TigriWeb.
-
AuthorPosts
-
January 18, 2026 at 11:22 am #255
gisele
ParticipantI want to change the ” read more” from products buttom but i don’t know where i can do this
January 18, 2026 at 11:30 am #256TigriWeb
KeymasterHi Gisele,
We use the
woocommerce_loop_add_to_cart_linkhook to modify the button. You can add the following function tofunctions.php, and it will override ours, because we wrap it with:
if ( ! function_exists( 'kampina_woocommerce_loop_add_to_cart_link' ) ) :/** * Function for <code>woocommerce_loop_add_to_cart_link</code> filter-hook. * * @param string $html * @param object $product * @param array $args * * @return string */ function kampina_woocommerce_loop_add_to_cart_link( $html, $product, $args ) { $button_text = $product->add_to_cart_text(); $svg_icons = '<svg class="icon-arrow" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" width="16" height="16"> <path d="M15.691,8.703l-4,4c-0.375,0.406-1.031,0.406-1.406,0c-0.406-0.375-0.406-1.031,0-1.406l2.281-2.312H1.004c-0.562,0-1-0.438-1-1c0-0.594,0.438-1,1-1h11.563l-2.281-2.281c-0.406-0.375-0.406-1.031,0-1.406c0.375-0.406,1.031-0.406,1.406,0l4,4C16.098,7.672,16.098,8.328,15.691,8.703z" fill="currentColor"/> </svg>'; switch ( $product->get_type() ) { case 'simple': $svg_icons .= '<svg class="icon-load" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" width="16" height="16"> <path d="M3,8c0-0.828-0.672-1.5-1.5-1.5S0,7.172,0,8s0.672,1.5,1.5,1.5S3,8.828,3,8z M3.403,1.903c-0.828,0-1.5,0.672-1.5,1.5s0.672,1.501,1.5,1.501s1.5-0.672,1.5-1.5S4.231,1.903,3.403,1.903z M3.403,11.097c-0.828,0-1.5,0.672-1.5,1.5s0.672,1.5,1.5,1.5s1.5-0.672,1.5-1.5S4.231,11.097,3.403,11.097z M8,13c-0.828,0-1.5,0.672-1.5,1.5S7.172,16,8,16s1.5-0.672,1.5-1.5S8.828,13,8,13z M14.5,6.5C13.672,6.5,13,7.172,13,8s0.672,1.5,1.5,1.5S16,8.828,16,8S15.328,6.5,14.5,6.5z M12.597,11.097c-0.828,0-1.5,0.672-1.5,1.5s0.672,1.5,1.5,1.5s1.5-0.672,1.5-1.5S13.425,11.097,12.597,11.097z M8,0C7.172,0,6.5,0.672,6.5,1.5S7.172,3,8,3s1.5-0.672,1.5-1.5S8.828,0,8,0z" fill="currentColor"/> </svg>'; $svg_icons .= '<svg class="icon-check" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" width="16" height="16"> <path d="M5.033,13.986L5.033,13.986c-0.267-0.001-0.526-0.103-0.715-0.292L0.295,9.671c-0.393-0.393-0.393-1.029,0-1.422c0.393-0.393,1.029-0.393,1.422,0l3.312,3.313l9.254-9.253c0.393-0.393,1.029-0.393,1.422,0c0.393,0.393,0.393,1.029,0,1.422l-9.958,9.957C5.559,13.876,5.299,13.986,5.033,13.986z" fill="currentColor"/> </svg>'; break; case 'variable': $button_text = apply_filters( 'woocommerce_product_add_to_cart_text', $product->is_purchasable() ? __( 'Check Availability', 'kampina' ) : __( 'Read more', 'kampina' ), $product ); break; } $html = sprintf( '<a href="%s" data-quantity="%s" class="%s" %s>%s%s</a>', esc_url( $product->add_to_cart_url() ), esc_attr( isset( $args['quantity'] ) ? $args['quantity'] : 1 ), esc_attr( isset( $args['class'] ) ? $args['class'] : 'button' ), isset( $args['attributes'] ) ? wc_implode_html_attributes( $args['attributes'] ) : '', esc_html( $button_text ), wp_kses( $svg_icons, 'kampina-svg' ) ); return $html; }Best Regards,
TigriWeb TeamJanuary 18, 2026 at 11:54 am #257gisele
Participantbut where i can put this code?
January 18, 2026 at 12:10 pm #258gisele
ParticipantI want to edit the “read more” to “leia mais” but I can’t understand how
January 18, 2026 at 12:16 pm #259TigriWeb
KeymasterIf you only need to translate the button text, you can use the Loco Translate plugin by following the guide below:
How to translate themes and plugins using Loco TranslateBest Regards,
TigriWeb TeamJanuary 18, 2026 at 1:29 pm #260gisele
Participantthe loco Plugin didn’t work with those buttons
January 18, 2026 at 1:31 pm #261TigriWeb
KeymasterCould you create a user “administrator” and send access to the admin panel to the email – tw-dev@tigriweb.dev ?
Best regards,
TigriWeb TeamJanuary 18, 2026 at 1:49 pm #262gisele
Participantdone
January 18, 2026 at 1:53 pm #263TigriWeb
KeymasterWhat URL do you use for login?
/wp-adminshows “Not acceptable” error.Best regards,
TigriWeb TeamJanuary 18, 2026 at 2:01 pm #264gisele
ParticipantI need to translate this and all the things like ” related products” and “overview” and in the same time i need a second language in the website… do you know if thats possible with loko?
January 18, 2026 at 2:15 pm #265TigriWeb
KeymasterI can’t log in to your website.
What URL do you use for login? /wp-admin shows “Not acceptable” error.
Best regards,
TigriWeb TeamJanuary 18, 2026 at 2:24 pm #266January 18, 2026 at 2:30 pm #267TigriWeb
KeymasterI can’t log in to your website: https://prnt.sc/d6zWHCiU-3Rg.
Perhaps you have other IP addresses blocked.
Best regards,
TigriWeb TeamJanuary 18, 2026 at 2:45 pm #268gisele
ParticipantOK. So I think I will try another way. I will let the button invisible but i need to delete the other things. the “Overview” in the product and the “related products”. can I do this?
January 18, 2026 at 3:01 pm #269TigriWeb
KeymasterTo remove related products, you need to add the following code to functions.php via FTP:
remove_action( 'kampina_content_after', 'kampina_woocommerce_output_related_products', 10 );Alternatively, you can hide them using the following CSS, which you can add via
Appearance → Customize → Additional CSS:.single-product .product .entry-summary + .product_tab-title, .single-product .related-products { display: none; }Best regards,
TigriWeb Team -
AuthorPosts
- You must be logged in to reply to this topic.