[Resolved] Woocommerce – Homepage Customization

Home Forums Support [Resolved] Woocommerce – Homepage Customization

Home Forums Support Woocommerce – Homepage Customization

Viewing 10 posts - 1 through 10 (of 10 total)
  • Author
    Posts
  • #2144916
    Sars

    Dear Team,

    How to Change color of button and the text in the button
    Also, How to Align all the product images evenly
    How to set the sizes of the product boxes?
    How to Hide the prices shown in the block.
    Is there a way to show first 2 and last 2 numbers in pagination? ex: 1 , 2 ……. 11, 12

    https://pasteboard.co/VLsO1E4l6LKW.png

    site: https://nationalroofingsupply.ca/

    #2144940
    Fernando
    Customer Support

    Hi Sarathy,

    With regards to changing the text, here is a PHP code you may try:

    add_filter( 'woocommerce_product_add_to_cart_text', function( $text ) {
        if ( 'Read more' == $text ) {
            $text = __( 'More Info', 'woocommerce' );
        }
    
        return $text;
    } );

    Kindly replace More info with the text you prefer.

    Here is an article with regards to adding custom PHP: https://docs.generatepress.com/article/adding-php/#code-snippets

    With regards its color, here is an article you may refer to: https://docs.generatepress.com/article/woocommerce-overview/#colors

    Alternatively, here is a Custom CSS you may try:

    .wp-block-button.wc-block-components-product-button.wc-block-grid__product-add-to-cart > a {
        background-color: rgb(0,0,250);
        color: rgb(255,0,0);'
    }

    Kindly change the RGB value to your preference.

    With regards to the images having different sizes, one approach to resolve this is to upload images with identical aspect-ratios. Alternatively, here is a CSS you may try:

    .wc-block-components-product-image.wc-block-grid__product-image img{
        aspect-ratio:1/1;
        object-fit: cover;
    }

    Here is an article with regards to adding CSS: https://docs.generatepress.com/article/adding-css/#additional-css

    Adding it through additional CSS should work.

    With regards to the pagination, you might also need custom code or a third Party plugin for this.

    Ex: https://wordpress.org/plugins/pagination-styler-for-woocommerce/

    Hope this helps! ๐Ÿ™‚

    #2144970
    Sars

    Awesome

    Thanks Fernando

    How to Hide the prices shown in the block.

    #2144974
    Fernando
    Customer Support

    Great! To hide the price, here is a custom CSS code you may try:

    span.wc-block-grid__product-price.price.wc-block-components-product-price {
        display:none;
    }

    Hope this helps! ๐Ÿ™‚

    #2144995
    Sars

    works Perfectly Well Fernando,
    One final help,
    On Hover, The number is not visible, Can you kindly give the code to change the hover color on pagination numbers?

    Thanks a lot

    #2145003
    Fernando
    Customer Support

    Here is a custom code you may try with regards to this:

    .wc-block-pagination.wc-block-components-pagination > button:hover{
        color: #cc5252;
    }

    For reference with regards to color codes: https://www.w3schools.com/colors/colors_picker.asp

    Hope this helps! ๐Ÿ™‚

    #2145021
    Sars

    Thanks again Fernando.

    One final help
    How to reduce the sizes of the block and images on mobile.

    They look very big on mobile.

    #2145031
    Fernando
    Customer Support

    One way to approach this is to add padding to the images on mobile view. Here is a CSS you may try:

    @media (max-width: 768px) {
        .wc-block-components-product-image.wc-block-grid__product-image img{
            padding: 20px;
        }
    }

    Please replace 20px with your preferred padding value.

    Kindly let me know how it goes. ๐Ÿ™‚

    #2145199
    Sars

    Works and Looks Great!

    Thanks a lot Fernando!!!

    #2146060
    Fernando
    Customer Support

    Youโ€™re welcome Sarathy! Glad that works! As always, feel free to reach out anytime if youโ€™ll need assistance with anything else. ๐Ÿ™‚

Viewing 10 posts - 1 through 10 (of 10 total)
  • You must be logged in to reply to this topic.