-
Notifications
You must be signed in to change notification settings - Fork 8
Filters
WooCommerce only features.
Default woo filters extended by custom cool features.
Widget area for add filters to archive is 'Archive product'.
How to work with default woo filter widgets - there are a lot info in internet, for example official docs https://docs.woocommerce.com/document/woocommerce-widgets/.
Starter allows to enable ajax for sort/filter and pagination without plugins!
By default this feature disabled, can be enabled into customizer.
Where to enable ajax for sort/filter & pagination
WordPress posts: everything handled via js assets\js\modules\wp\archive.js
: by click requests related page (html) and injects into page.
WooCommerce products: everything handled via js assets\js\modules\woo\archive.js
: by click requests related page (html) and injects into page.
Fitlers has two custom selects for setup display type on front.
- Open widgets
- Add fitler (or expand existing) and setup display types for dekstop and mobile (by default used 'list' type)
Filter markup is customized in file inc\woocommerce\filter.php
: added ACF Filter widget
for dekstop/mobile display types and added required minimum markup for dropdown and collapse. Filter diplay type settings handled via css assets\scss\theme\woo\_filters.scss
.
- Open any attribute
- Add color
Filter markup is customized in file inc\woocommerce\filter.php
: added ACF Color taxonomy
and required minimum markup. Styled in file assets\scss\theme\woo\_filters.scss
.
- ACF:
Filter widget
andColor taxonomy
- js:
assets\js\modules\wp\archive.js
assets\js\modules\woo\archive.js
- css:
assets\scss\theme\woo\_filters.scss
- tpl:
-
index.php
- template for archive blog posts -
woocommerce\archive-product.php
- template for archive products-
starter_archive_url
- get archive canonical URL -
<!-- filters layout -->
- filters markup
-
-
woocommerce\content-widget-price-filter.php
- ovverride default woo price filter tpl
-
- logic:
-
inc\woocommerce\filter.php
- customize filter layout; Change Price Filter Widget Increment; customize text in Sort select; Register Archive page widget area; customizer
-