I’m building my custom wordpress template page and I would like to do a dropdown list (or anyone else) with selected product who, selected, appears in the bottom of the page !
Currently, I the best way I found is :
<form action="" method="get"><select name="type" id="selectNewCard"> <option disabled selected ></option> </form>
and at the bottom of the page in a div:
<?php if(isset($_GET['type'])) echo do_shortcode('[product_page id="'.$_GET['type'].'"]'); else ?>
The code does the job, but I’m not satisfed yet ! If a plugin already exists with shortcode, I’ll take it too !
Thanks in advance !
Read more here: dropdown list who load product woocommerce