Support » Plugin: WooCommerce Products Per Page » Change the position

  • Resolved lonwi


    A very useful plugin.

    I am trying to remove this actions and add them into place

    add_action( 'woocommerce_before_shop_loop', array( $this, 'products_per_page_dropdown' ), 25 );
    add_action( 'woocommerce_after_shop_loop', array( $this, 'products_per_page_dropdown' ), 25 );

    How can I do this from my theme functions.php?
    I would like to replace “woocommerce_before_shop_loop” into “woocommerce_before_shop_loop_custom_2” so plugin update will not overwrite it.

Viewing 1 replies (of 1 total)
  • Plugin Author Jeroen Sormani



    You should be able to set the ‘Drop down location’ option to ‘none’ to make sure it doesn’t show on either of those positions.

    After that it can be added through something like this (untested code)

    if ( function_exists( 'Woocommerce_Products_Per_Page' ) ) {
        add_action( 'custom_hook', array( Woocommerce_Products_Per_Page()->frond_end, 'products_per_page_dropdown' ) );

    Hope that helps 🙂


Viewing 1 replies (of 1 total)
  • The topic ‘Change the position’ is closed to new replies.