Hi, adwap7.
Can you provide ‘some code from google’ here?
What kind of url should it be?
Thread Starter
adwap7
(@adwap7)
the code is
<blockquote>/**
* add live demo button to single product page
*/
function isa_before_add_to_cart_form() {
global $post;
$demoslug = $post->post_name;
// $demourl = get_bloginfo('url').'/'.$demoslug.'/';
/*---------------------------------*/
// get just the domain without http
$home_url = home_url();
$find = array( 'http://', 'https://', 'http://www.', 'https://www.', 'www.' );
$domain = str_replace( $find, '', $home_url );
// put the new url together
if (is_ssl()) {
$protocol = 'https';
} else {
$protocol = 'http';
}
$demourl = $protocol . '://' . $demoslug . '.' . $domain;
/*-----------------------------------*/
$demotitle = esc_attr($post->post_title);
echo '<a href="'.$demourl.'" title="'.$demotitle.'">Live Demo</a>';
}
</blockquote>
click live demo to chek url solutiondude.in/product/downloading-autoindex-script/
Thanks.
The url in the last line is of single product page, right?
What is the url for the demo page should be?
Thread Starter
adwap7
(@adwap7)
right,
demo page url will subdomain named product name