This article was last manually reviewed for data accuracy on 14 November 2025.
WooCommerce shop page hooks provide powerful and flexible tools for customizing the online store’s central product browsing page and the archive pages. By leveraging these predefined hooks in your theme or plugin, you can easily add, modify, or remove content and functionality without touching core WooCommerce files.
This article presents the complete list of all WooCommerce Shop Page Hooks and a visual guide of the Woo Shop Page hooks. Bookmark this article for your ready reference.
Visual Guide: WooCommerce Shop Page Hooks

Complete List of WooCommerce Shop Page Action Hooks
| Group & Location | Hook Name | Description & Usage | Default Functions |
|---|---|---|---|
| Page Wrappers | woocommerce_before_main_content | Fires before the main content wrapper. Used to open structural markup and output breadcrumbs. | woocommerce_output_content_wrapper, woocommerce_breadcrumb |
| woocommerce_after_main_content | Fires after the main content wrapper. Used to close structural markup. | woocommerce_output_content_wrapper_end | |
| woocommerce_sidebar | Outputs the sidebar area. | woocommerce_get_sidebar | |
| Archive Description & Notices | woocommerce_archive_description | Displays taxonomy/archive description (e.g., category text). | woocommerce_taxonomy_archive_description, woocommerce_product_archive_description |
| woocommerce_notices | Displays general notices (e.g., “Product added to cart”). | wc_print_notices | |
| Loop Wrappers | woocommerce_before_shop_loop | Fires before the product loop. Commonly used for result count and ordering dropdown. | woocommerce_result_count, woocommerce_catalog_ordering |
| woocommerce_before_shop_loop_products | Fires before the <ul class=”products”> wrapper. | None by default | |
| woocommerce_after_shop_loop_products | Fires after the <ul class=”products”> wrapper. | None by default | |
| woocommerce_after_shop_loop | Fires after the product loop. Commonly used for pagination. | woocommerce_pagination | |
| Product Item Wrappers | woocommerce_before_shop_loop_item | Fires before each product item wrapper. | None by default |
| woocommerce_before_shop_loop_item_title | Fires before product title. Commonly used for thumbnails. | woocommerce_template_loop_product_link_open, woocommerce_template_loop_product_thumbnail | |
| woocommerce_shop_loop_item_title | Outputs product title. | woocommerce_template_loop_product_title | |
| woocommerce_after_shop_loop_item_title | Fires after product title. Commonly used for price and rating. | woocommerce_template_loop_rating, woocommerce_template_loop_price | |
| woocommerce_after_shop_loop_item | Fires after each product item wrapper. Commonly used for add-to-cart button. | woocommerce_template_loop_product_link_close, woocommerce_template_loop_add_to_cart | |
| Empty State | woocommerce_no_products_found | Fires when no products are found. | wc_no_products_found |
Essential List of WooCommerce Shop Page Filters
| Group & Location | Hook Name | Description & Parameters |
|---|---|---|
| Page Title & Layout | woocommerce_page_title | Filters the page title text. Parameters: (string $page_title) |
| woocommerce_show_page_title | Boolean filter to show/hide page title. Parameters: (bool $show) | |
| woocommerce_products_per_page | Controls number of products per page. Parameters: (int $products_per_page) | |
| loop_shop_columns | Sets number of columns in product grid. Parameters: (int $columns) | |
| loop_shop_per_page (legacy) | Legacy filter for products per page. Parameters: (int $products_per_page) | |
| woocommerce_get_loop_prop | Filters loop properties (columns, pagination, etc.). Parameters: (mixed $value, string $prop) | |
| Breadcrumbs & Pagination | woocommerce_breadcrumb_defaults | Customize breadcrumb defaults (delimiter, home text, etc.). Parameters: (array $defaults) |
| woocommerce_pagination_args | Customize pagination arguments. Parameters: (array $args) | |
| woocommerce_is_filtered | Boolean filter for whether products are filtered. Parameters: (bool $is_filtered) | |
| Loop Markup | woocommerce_product_loop_start | Filters opening markup of product loop. Parameters: (string $markup) |
| woocommerce_product_loop_end | Filters closing markup of product loop. Parameters: (string $markup) | |
| woocommerce_post_class | Filters product <li> classes. Parameters: (array $classes, WP_Post $product) | |
| Product Output | woocommerce_get_price_html | Filters product price HTML. Parameters: (string $price_html, WC_Product $product) |
| woocommerce_loop_product_visibility | Controls product visibility in loop. Parameters: (bool $visible, int $product_id) | |
| woocommerce_catalog_orderby | Customize catalog ordering options. Parameters: (array $orderby_options) | |
| woocommerce_result_count | Filters result count output. Parameters: (string $html, WC_Query $query) | |
| woocommerce_catalog_ordering | Filters ordering dropdown output. Parameters: (string $html) | |
| woocommerce_loop_add_to_cart_link | Filters add-to-cart button HTML. Parameters: (string $html, WC_Product $product) | |
| woocommerce_loop_product_link | Filters product link HTML. Parameters: (string $link, WC_Product $product) | |
| woocommerce_loop_product_thumbnail | Filters product thumbnail HTML. Parameters: (string $html, WC_Product $product) | |
| woocommerce_loop_product_title | Filters product title HTML. Parameters: (string $title, WC_Product $product) | |
| woocommerce_loop_product_rating | Filters product rating HTML. Parameters: (string $html, WC_Product $product) | |
| woocommerce_loop_product_price | Filters product price HTML. Parameters: (string $html, WC_Product $product) | |
| Query Modifiers | woocommerce_product_query_meta_query | Modify the product query based on custom fields. Parameters: (array $meta_query, WC_Query $query) |
| woocommerce_product_query_tax_query | Modify the product query based on taxonomies. Parameters: (array $tax_query, WC_Query $query) | |
| woocommerce_product_query | Modify the entire product query arguments before execution. Parameters: (WP_Query $query) | |
| woocommerce_default_catalog_orderby | Sets the default catalog ordering option. Parameters: (string $orderby) | |
| Related & Cross-sells | woocommerce_related_products_args | Filters the query arguments for related products. Parameters: (array $args) |
| woocommerce_cross_sells_columns | Filters the number of columns used to display cross-sell products. Parameters: (int $columns) |
Code Examples: Actions vs. Filters in WooCommerce Shop Page
Deep Dive: For a comprehensive understanding of WooCommerce Filter and Hooks refer to WooCommerce Hooks and Filters: Complete Guide with Examples.
WooCommerce Shop Page Action Hook Example : Adding a Custom Banner
This example adds a custom banner at the top of the shop page using the action hook woocommerce_before_main_content. Actions are used for outputting additional content or running some code at specific points.
php
add_action('woocommerce_before_main_content', 'custom_banner_before_main_content');
function custom_banner_before_main_content() {
echo '<div class="custom-banner" style="background:#ffefc5; padding: 15px; text-align:center;">
Welcome to Our Shop! Enjoy 10% off today.
</div>';
}This code hooks into woocommerce_before_main_content and outputs an HTML banner before the main content wrapper starts.
WooCommerce Shop Page Filter Hook Example : Modify the number of products displayed
This example modifies the number of products displayed per shop page using the filter hook woocommerce_products_per_page. Filters are used to modify or return a value after applying some logic.
php
add_filter('woocommerce_products_per_page', 'custom_products_per_page', 20);
function custom_products_per_page($products_per_page) {
return 24; // Display 24 products per page instead of default
}This hook filters the number of products shown on each shop page load. It intercepts the default value and returns a customized one.
PRO Tip: Bookmark all our Visual WooCommerce Hook Guides for ready reference.
Summary: Mastering WooCommerce Shop Page Customization
Understanding how to use WooCommerce shop page hooks allows you to create a unique, user-friendly shop experience that aligns with your brand and SEO goals. Customizing your shop page with these hooks lets you place promotional content, optimize product visibility, and improve site navigation.
Whether adding banners, adjusting product grids, or filtering product display behavior, hooks ensure your WooCommerce site remains modular and maintainable. This WooCommerce Shop Page Hook visual guide can help to become an expert in this!
FAQs: WooCommerce Shop Page Hooks Answered
What are WooCommerce shop page hooks?
WooCommerce Shop Page hooks are predefined action and filter points in WooCommerce templates specifically for the shop (product archive) page. They allow you to insert or change content and behavior at specific locations without editing core files.
How do action and filter hooks differ in WooCommerce Product Archive Page?
Action hooks let you add custom output or execute code at certain points in the page. Filter hooks allow you to modify data or markup by intercepting and returning a changed value.
Where do I add code to customize WooCommerce shop page hooks?
Typically, you add your hook-based customizations in the functions.php file of your child theme or in a custom plugin to ensure updates don’t overwrite changes.
Are there risks to using WooCommerce hooks?
Improper use of WooCommerce Hooks can cause layout issues or conflicts with other plugins/themes. Always test changes on a staging site and document your customizations.
Did this help? Send a sip
Leave a Reply