• Resolved dansperfect

    (@dansperfect)


    John,

    How are you today? Following the directions in the Lithestore theme docs on how to remove a section, for some reason I cannot get this to work properly.

    adding this to functions.php or frameworks/hooks.php in the child theme:

    <?php
    
    remove_action( 'lithestore_on_sale_products', 'lithestore_on_sale_products');
    remove_action( 'lithestore_popular_products', 'lithestore_popular_products');
    
    ?>
    

    does nothing for me. What am I missing here, or what am I doing wrong? Thank you once again for your help and support.

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter dansperfect

    (@dansperfect)

    Sorry figure it out. I had to call and create a function that used the remove_action. For further info for anyone else check here:

    https://codex.wordpress.org/Function_Reference/remove_action

    Theme Author badjohnny

    (@badjohnny)

    Yes, you can write as below for new version of WordPress, I will correct the documentation.

    add_action('init','remove_section');
    function remove_section(){
    	remove_action( 'lithestore_on_sale_products', 'lithestore_on_sale_products');
    	remove_action( 'lithestore_popular_products', 'lithestore_popular_products');
    }
Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Cannot Remove Homepage Sections Child theme’ is closed to new replies.