To begin, create a new file in your theme called shopwp-scripts.js. Also keep in mind that some of our hooks require ShopWP Pro. The only way to ensure this happens is to import (or enqueue) your JavaScript at the right point. The reason, is that the JavaScript you write needs to run after ours. □ Using JavaScript hooksĪll the JavaScript hooks we provide require a child theme to use. Where do these code snippets go? You guessed it. However, this is just the tip of the iceberg! There are tons of options for customizing core features of the plugin with small code snippets. For example, if you open the settings you’ll see different options for products, collections, cart, etc. ShopWP provides many opportunities for customization. For a full list of child theme options, have a look at the official WordPress docs. There are more things you can customize with your child theme, but this is technically all you need. You should see your child theme listed there without a screenshot. Open the dashboard and click Appearance - Themes. Now that we have our child theme created, the last step is to activate it. This imports (or enqueues) our child theme’s style.css file.Ĭongrats! □ You’re close to having a working child theme. '/style.css', ) Īdd_action( 'wp_enqueue_scripts', 'child_styles', 99 ) for example if name of the js file is custom. Wp_enqueue_style( 'child-theme-css', get_stylesheet_directory_uri(). You should enqueue the script in child themes functions.php. Once you have this file created, copy / paste the below code inside:
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |