• Hi,

    I have created a Child Theme from OceanWP, I did some modify in the file style.css of OceanWP-Child theme however it does not take any effect. This is my functions.php and style.css file:
    functions.php
    <?php
    add_action( ‘wp_enqueue_scripts’, ‘my_theme_enqueue_styles’, 11 );
    function my_theme_enqueue_styles() {
    wp_enqueue_style( ‘child-style’, get_stylesheet_uri() );
    }
    add_action( ‘woocommerce_after_cart’, function() {
    ?>
    <script>
    jQuery(function($) {
    var timeout;
    $(‘div.woocommerce’).on(‘change textInput input’, ‘form.woocommerce-cart-form input.qty’, function(){
    if(typeof timeout !== undefined) clearTimeout(timeout);

    //Not if empty
    if ($(this).val() == ”) return;

    timeout = setTimeout(function() {
    $(“[name=’update_cart’]”).trigger(“click”);
    }, 500); // 0.5 second delay
    });
    });
    </script>
    <?php
    } );
    ?>
    style.css Files:
    */
    Theme Name: OceanWP Child
    Theme URL: https://duocphamnga.com
    Description: OceanWP Child Theme by Edited by Duc
    Author: Duc Nguyen Ba
    Author URL: https://duocphamnga.com
    Template: oceanwp
    Version: 1.8.7
    Text Domain: OceanWP Child
    */ Custom CSS goes after this line
    .woocommerce-cart table.cart td.actions button[name=’update_cart’] {
    float: right;
    display: none;
    }
    .wpcf7 {
    background: #A3A3A3;
    border: 1 px solid #494949 ;
    width: 700 px;
    }

Viewing 3 replies - 1 through 3 (of 3 total)
  • Hi canabalance!

    Sorry to hear you’re having some issues with child themes.

    The stylesheet has loaded correctly: https://imgur.com/a/0faEXFE

    There’s a gap between the number and px of the width and border in the .wpcf7 class, which is why the form styling hasn’t changed. It should read as follows:

    .wpcf7 {
    background: #A3A3A3;
    border: <strong>1px</strong> solid #49494<strong>9;</strong>
    width: <strong>700px</strong>;
    }

    As for the .woocommerce-cart table.cart td.actions button[name=’update_cart’], I’d suggest following this guide. It explains exactly how to change the “Update cart” button in a similar way to how you want it to work.

    Or you could try this guide that explains how to modify the cart page in general.

    Please let me know if you need any further help!

    • This reply was modified 4 years, 3 months ago by Niall Madhoo.
    • This reply was modified 4 years, 3 months ago by Niall Madhoo.
    Thread Starter canabalance

    (@canabalance)

    Hi Niall,
    Thank you very much for your support.
    My purpose is hide the button” Update Cart”,
    In the link you sent to me they recommend use the css:
    `button[name=’update_cart’] {
    display: none !important;
    }
    However it still does not change anything, Even I clear the cache of Browser and using command: ipconfig/ flushdns in the CMD

    Hi canabalance,

    You’re welcome!

    I’d suggest posting in the WooCommerce support forum found here, as there may be someone there that’s better able to help you.

    Niall

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘CSS modify does not work on child thêm’ is closed to new replies.