I want to load products deatails on my custom page.Is there any way that i can use the url key
like http://localhost/mysite/product/samsung-1
.In this url samsung-1
is the key for that product.I want to use this and get product details like name,description and attributes.Can i do this using url key
or i have to use id for this.thanks
I tried this code but this uses id :
<?php $post = get_post('5653'); //assuming $id has been initialized
echo "<pre/>";
print_r($post);
wp_reset_postdata();?>