How I built a free e-commerce site … plugins and methods I used … any tips or questions

@Ollie
I just learned about hooks and they seem interesting … I’ll have to study them more and give them a try. I thought Kadence Blocks would be enough, but I couldn’t even get product images to crop properly. I switched to Blocksy, which is more customizable but not as fast. Can you use intersection observers for scroll animations with your child theme setup?

@Teal
To crop images, I use the “section” block and add a background image, but that doesn’t work for every case. With JS, you can use the intersection observer API, but I’ve only used scroll event listeners so far

@Ollie
I meant the images on the product page generated by WooCommerce. I switched to Blocksy, and the cropping just worked. I can’t figure out why. For now, I’m sticking with Blocksy. Intersection observers are more efficient than scroll event listeners … you should try them. Do you know any tutorials for adding custom CSS and JS after creating a child theme?

@Teal
I don’t know a specific tutorial, but here’s how I do it: I create the child theme with the “Child Theme Configurator” plugin by Lilaea Media. Once the child theme is active, I uninstall the plugin. Then, I go to Appearance > Theme File Editor to edit the functions.php and style.css files. For CSS, I edit styles.css. For JS, I add this code at the end of functions.php:

function custom_javascript() {
?>
    <script>
       //( your JS code)
    </script>
<?php
} add_action('wp_footer', 'custom_javascript');

This adds JavaScript to the footer. Change ‘wp_footer’ to ‘wp_head’ to place JS in the head instead. Using child theme files ensures your code isn’t wiped during theme updates. Sometimes, the functions.php file doesn’t update correctly, so I work locally using Local and edit files in VS Code

@Ollie
That’s very helpful … thank you

Teal said:
@Ollie
That’s very helpful … thank you

No problem … cheers

@Teal
I see what you mean about hooks … I tried them before creating manual product pages. It seems a bit tricky, especially for someone not great at PHP, but it’s doable with hooks