Hi Roger,
Can you be a little more specific on the sort of information you are looking for?
For example I want to follow this link and have a JavaScript and add a few lines of php into functions.php.
The specific code I want to insert is here
Thanks.
Here’s an example of how you can do that:
add_action( 'wp_enqueue_scripts', function () {
if ( ! is_shop() && ! is_product_category() ) {
return;
}
$select2_version = '4.0.6-rc.0';
wp_enqueue_style(
'my-select2',
"https://cdnjs.cloudflare.com/ajax/libs/select2/{$select2_version}/css/select2.min.css",
array(), $select2_version
);
wp_enqueue_script(
'my-select2',
"https://cdnjs.cloudflare.com/ajax/libs/select2/{$select2_version}/js/select2.min.js",
array( 'jquery' ), $select2_version
);
} );
add_action( 'wp_head', function () { ?>
<script>
jQuery(document).ready(function ($) {
$('.woocommerce-ordering select').select2();
});
</script>
<?php } );
Let me know if you have any questions.