I have created custom template page like this with a custom query on page showing only details fetch from my custom table not any post.
/*
Template Name:product
*/
<?php get_header(); ?>
<?php
$data = $wpdb->get_results("myquery Here");
foreach($data as $row)
{
product Name: $row->p_name;
prod price: $row->p_price;
?>
<a href="">VIEW PRODUCT</a>
<?php
}
?>
<?php get_footer();?>
I need help about when we click on "VIEW PRODUCT" then how can I redirect to next view_detail page?
For that can I create another *view_detail.php* page?
What should I write on href=""
with passing product_id
, which I get on view_detail.php.