Shortcode
-
Once in a while I get the question for a shortcode for the dropdown. I created a small code snippet that adds this shortcode, but because there are mixed results expected with different themes and locations I cannot provide any support on this shortcode (hence why it isn’t in the plugin itself).
It is not expected to work on a page where you’re showing the products through a WC shortcode, though I must admit I haven’t tested it either ??
function custom_wppp_shortcode() { if ( method_exists( Woocommerce_Products_Per_Page()->front_end, 'products_per_page_dropdown' ) ) { Woocommerce_Products_Per_Page()->front_end->products_per_page_dropdown(); } } add_shortcode( 'wppp', 'custom_wppp_shortcode' );
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘Shortcode’ is closed to new replies.