![](https://beanscommunity.wpenginepowered.com/wp-content/uploads/beans/images/c65becb4220004cc485ee13119f60900-87a1c39.jpg)
Hi Thierry,
I want use another framework. So I added this action in functions.php of child theme.
beans_remove_action ('beans_enqueue_uikit_components');
And I want to use the compression function of less file.
But dose no work this action with "beans_remove_action ('beans_enqueue_uikit_components');"
add_action( 'beans_uikit_enqueue_scripts', 'beans_child_enqueue_uikit_assets' );
function beans_child_enqueue_uikit_assets() {
beans_compiler_add_fragment( 'uikit', get_stylesheet_directory_uri() . '/style.less', 'less' );
}
If "beans_remove_action ('beans_enqueue_uikit_components');" is used in the file of functions.php, will not work action of "beans_uikit_enqueue_scripts" ?
Thanks for read my question. and my english is not good...
![](https://beanscommunity.wpenginepowered.com/wp-content/uploads/beans/images/c70294be72623e3f8995ee4832f8d065-87a1c39.jpg)
Hi M,
The way you are dequeuing UIkit is correct, but the way you are adding your need LESS file isn't π In your snippet, you are trying to add a fragment to the uikit
compiler, but since you removed it nothing is happening.
Instead, you should create your one compiler as such:
add_action( 'wp_enqueue_scripts', 'example_enqueue' );
/**
* Example enqueue.
*/
function example_enqueue() {
beans_compile_less_fragments( 'example', array(
get_stylesheet_directory_uri() . '/style.less',
// More files if needed...
) );
}
This will create a new compiled file with the ID example
. If you then need to add fragments (files) to the compiler in a specific page for example, you may use the same script as your posted but with example
handle instead of uikit
.
I hope that makes sense, you will find more information in the Compiler API documentation.
Happy coding,
![](https://beanscommunity.wpenginepowered.com/wp-content/uploads/beans/images/c65becb4220004cc485ee13119f60900-87a1c39.jpg)
Hi Thierry.
Thanks to your support, this problem has been solved. π