Posts

Showing posts with the label categories pages

How to add a custom product page dropdown option in front end shop or categories pages in woocommerce wordpress

How to give a option to customer for display product as they want For add a custom dropdown on shop or category page , paste below code to your functions.php file of your current active theme. // below action add a new custom dropdown box to shop or category page add_action( 'woocommerce_before_shop_loop', 'rj_product_per_page_dropdown', 25 ); function rj_product_per_page_dropdown() {     global $wp_query,$woocommerce;         $action = '';         $cat     = '';         $cat     = $wp_query->get_queried_object();         $query_string = ! empty( $_SERVER['QUERY_STRING'] ) ? '?' . add_query_arg( array( 'rj_pro_page' => false ), $_SERVER['QUERY_STRING'] ) : null;         if ( isset( $cat->term_id ) && isset( $cat->taxonomy ) ) :         ...