0
Friends,
I am listing product data from a table created in the wp structure. I have created a "products.php" template where I list it 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"
You can do this in WP with templates?
<a url="???">produto 1</a>
I will have to point to another template page (products-item.php)?
I did it, it worked great, thanks, but I’m thinking about the friendly url here. How do I put these friendly urls. I think I’ll have to create a Slug for each product.
– Rod
Exactly, you save a Slug and then use . htaccess to remove the id, but recommend instead of removing leave on the default site.com/1/tv-lcd
– Renato Tavares
can sweat site.com.br/product/1/product-a
– Renato Tavares
I’ll try to do, thanks buddy.
– Rod
1 would be the id? with Slug I guess I wouldn’t need that id.
– Rod
will give a work this gambiarra, the right would be to make a plugin. rs
– Rod
You don’t need to, but the right one, in my view and always take product data by ID and only put Slug for SEO, because if you change Slug to something else, the ID doesn’t change and you don’t lose the reference to the page. You’ll never have an SEO problem. If you do not use error 404 ID you whenever you change the Slug of a product and we know that it always changes (at least my customers)
– Renato Tavares
Vdd friend. Thanks.
– Rod
Another obstacle has arisen here. besides the url has the issue of title, Description, Canonical, etc... on the product item page. I want to see how I’m going to do this, since I’m looking for something dynamic on a page that’s static.
– Rod