Insert text inside WordPress Shortcode,with PHP

I’m developing this webstore, and what I’m looking for is a way to send text inside this shortcode using PHP $_GET –

[product_category category=" HERE " per_page="12" columns="4" orderby="price" order="asc"]';

I’ve written this code –

Read More
if(isset($_GET['category']))
    $category = $_GET['category'];
else
    $category = 'dogs_food';

echo '[product_category category="' . $category . '" per_page="12" columns="4" orderby="price" order="asc"]';

Added an list of categories –

  <ul>                      
    <li>  
      <a href="?category=dog_old">old</a>      
    </li>

    <li>  
      <a href="?category=puppy">puppy</a>      
    </li>

    <li>     
      <a href="?category=dog_middle">medium</a>
    </li>

  </ul>

And still nothing happens when I click on the categories.

Thanks

Related posts