Template Page - List data and send to another template

0

Friends,

I am listing product data from a table created in the wp framework. I created a page "products.php" template where ready like this:

produto 1
produto 2
produto 3
...

Each product of this will have a link that will point to another page with product item "products-item.php"

Is it possible to do this in WP with templates?

<a url="???">produto 1</a>

Will I have to point to another page template (products-item.php)?

    
asked by anonymous 22.11.2018 / 14:13

1 answer

1

You can browse through the list of products by taking their ids and using them to compose the URL of produtos-item.php

<a url="produtos-item.php?id=$id">produto 1</a>

You will recover on the products-item.php page using $_GET['id']

    
22.11.2018 / 14:36