Consider supporting my work by purchasing the course this tutorial is a part of i.e. VSCode Power User →
- Make sure your
Local by FlyWheelWordPress install is a custom install
| add_filter( 'woocommerce_single_product_carousel_options', 'filter_single_product_carousel_options' ); | |
| function filter_single_product_carousel_options( $options ) { | |
| $options['slideshow'] = true; | |
| $options['animationLoop'] = true; | |
| $options['slideshowSpeed'] = 3000; | |
| return $options; | |
| } |
Consider supporting my work by purchasing the course this tutorial is a part of i.e. VSCode Power User →
Local by FlyWheel WordPress install is a custom installSo, you know how to override a template file in Woocommerce using Sage, but you're having trouble changing something within the deeper level of that template file. For example, you want to change the output HTML structure of a given part of the product page loop, or incorporate a Bootstrap class into a button element without using Jquery to inject it. Here's how you can override deeper level parts, the default WC theme elements.
Now you're familiar with how to do Sage + Woocommerce templates, it's time to make it happen.
| #!/usr/bin/env bash | |
| # Generic macOS workstation setup | |
| # | |
| # A pragmatic, public bootstrap for developer / technical-productivity Macs. | |
| # It installs Homebrew, common CLI utilities, runtimes, terminal/editor/agentic | |
| # coding apps, viewers, media tools, and a curated font set. | |
| # | |
| # Philosophy: | |
| # - Open-source / cross-platform first. | |
| # - Commercial apps only when explicitly useful/common for this workflow. |
| <?php | |
| # http://kovshenin.com/2012/the-wordpress-settings-api/ | |
| # http://codex.wordpress.org/Settings_API | |
| add_action( 'admin_menu', 'my_admin_menu' ); | |
| function my_admin_menu() { | |
| add_options_page( __('My Plugin Options', 'textdomain' ), __('My Plugin Options', 'textdomain' ), 'manage_options', 'my-plugin', 'my_options_page' ); | |
| } | |
| add_action( 'admin_init', 'my_admin_init' ); |
| <?php | |
| /* | |
| Plugin Name: Instrument Hooks for WordPress | |
| Description: Instruments Hooks for a Page. Outputs during the Shutdown Hook. | |
| Version: 0.1 | |
| Author: Mike Schinkel | |
| Author URI: http://mikeschinkel.com | |
| */ | |
| if (isset($_GET['instrument']) && $_GET['instrument']=='hooks') { |