Add to product list template

Use this section to add elements to filtered product lists using the standard Woocommerce hooks or other means, where applicable. To insert the element, select it in the dropdown box and push the Add to product list (“+”) button.

In the basic plugin version you can add the following items:

  • annasta Filters Preset
    Please uncheck the Force wrapper reload option to be able to insert an annasta Filters preset! Use this option with woocommerce_before_shop_loop if your theme doesn’t offer widget areas above Woocommerce product lists and you wish to insert filters on top of the filterable product list.
  • Shop title
  • Woocommerce Sort by control
  • Pagination: display additional page numbers blocks at the needed positions
    Please remember that page numbers get hidden when the Pagination is set to Infinite scroll or “Load more” button.
  • Default WooCommerce pagination
    If your theme overwrites the native Woocommerce pagination to the point that filters fail to hook and provide the pagination support, you can make use of this option and insert the original Woocommerce pagination block.
    Themes with known pagination overrides are: Blocksy, Rife.
  • Results count message
  • Product categories / subcategories
    Display the list of the product categories (or subcategories) which return (more than zero) products in the current filters combination. Any currently active filters will be auto-applied to the category archives’ links.

    Use this option to compensate for the native WooCommerce categories/subcategories display being blocked by the Force products display option.

    Tip #1: in most themes the placement of categories list above products can be achieved by setting the hook to woocommerce_before_shop_loop at a high priority, for example, 1000.

    Tip #2: the amount of columns for the categories list is controlled by the annasta Filters > Product Lists > Product columns option.

    Tip #3: if you need to activate the categories lists display on filterable [products] shortcode pages, enable the hidden awf_display_categories_on_sc_pages option by running the following code once from the functions.php file of your theme (the code can be later deleted):
    update_option( ‘awf_display_categories_on_sc_pages’, ‘yes’ );

The premium version adds the following choices:

  • Reset all filters button
  • Active filters badges – will display an extra active filters’ collector at the specified position.

    Select the JavaScript hook to auto-insert the badges above the products list. If you wish to insert the collector before some particular HTML container, use the JavaScript mode in combination with one of the following methods:

a. If you use your own custom theme or a child theme, specify the selector of the element before which you wish to insert the badges with the help of the filter added to the functions.php file:

function customize_annasta_js_badges_position( $js_data ) {
  $js_data['title_badges_insert_before'] = '.woocommerce-ordering';
 
  return $js_data;
}
add_filter( 'awf_js_data', 'customize_annasta_js_badges_position' );

OR

b. Add the following JavaScript in annasta Filters > Plugin settings > Custom JavaScript box or anywhere else it may suit you:

jQuery( document ).ready( function( $ ){
  if( typeof( awf_data ) !== 'undefined' ) {
      awf_data.title_badges_insert_before = '.woocommerce-ordering';
  }
});

Replace the ‘.woocommerce-ordering’ selector with the one relevant to your theme.