Add elements

Use this section to add elements to the 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, then select the appropriate hook and priority.

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

  • annasta Filters Preset
    If your theme doesn’t offer widget areas above WooCommerce product lists, use this option with woocommerce_before_shop_loop hook to insert filters on top of product lists.

    Please uncheck the Force wrapper reload option to be able to insert an annasta Filters preset!
  • 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.