Home Forums WoodMart support forum Change the text in the "Buy button" Any CSS?

Change the text in the "Buy button" Any CSS?

Viewing 12 posts - 1 through 12 (of 12 total)
  • Author
    Posts
  • #193777

    Element_Earth_CBD
    Participant

    Just wondering, it would be nice to change it to something better inline with the products. Thank you for any help.

    James

    Attachments:
    You must be logged in to view attached files.
    #193784

    emsaygroup
    Participant

    How exactly do you want to make a change? Will there be a variable text for each product or category, or a fixed text? You can make changes yourself using the sample filter below.

    
    add_filter( 'woocommerce_product_add_to_cart_text', 'custom_add_to_cart_text', 10, 1 );
    function custom_add_to_cart_text( $text ) {
        $text = __( 'Example', 'woocommerce' );
        return $text;
    }
    

    You can use the function file of your child theme to add this code. If you are not sure how to do it, I recommend not using it.

    #193787

    Element_Earth_CBD
    Participant

    Yes, like I want to be able to say something different!

    Use that CSS code or is there another one for when the product
    James

    #193844

    Hello,

    Please clarify the purpose: when you hover the product how it should look like? What should be different?

    Best Regards

    #193855

    Element_Earth_CBD
    Participant

    Instead of BUY NOW it can be EXPLORE or SEE MORE, when your products are not cheap it looks too hasty to have the buy now button on somethings.

    Possible?

    James

    #193917

    Hello,

    You can rewrite the button, but it would be applied to all the products no depending on its type of price. Woocommerce does not provide the option to set different buttons.

    Best Regards

    #193930

    Element_Earth_CBD
    Participant

    Ok, how?

    James

    #194013

    Hello,

    You can rewrite all theme and plugin texts via PO file in WordPress. Here is a video tutorial that should help you rewrite your website texts with a Loco Translate plugin https://www.youtube.com/watch?v=D3NsDdMzsls&list=PLMw6W4rAaOgKKv0oexGHzpWBg1imvrval&index=3

    Best Regards

    #194412

    Element_Earth_CBD
    Participant

    Thank you, it looks difficult, but its easy? I dont want to mess up everything on site.

    James

    #194448

    Hello,

    You can rewrite all the text and then delete the plugin, nothing would be messed. It is not difficult at all.
    We suggest you to keep translated files in wp-content/languages/themes/woodmart-pt_PT.po folder.

    Best Regards

    #194456

    Element_Earth_CBD
    Participant

    🙁 How to make sure the files stay in here?

    wp-content/languages/themes/woodmart-pt_PT.po folder

    #194571

    Hello,

    When you create a language chose this option https://prnt.sc/sfvito

    Best Regards

Tagged: 

Viewing 12 posts - 1 through 12 (of 12 total)