There is a wordpress template Parallax One in which I am interested in the blue download button on the first screen. when you click on it - go to the main page of the site using onclick
.
<button onclick="parent.location='http://themeisle.com/themes/parallax-one/'" data-anchor="" class="btn btn-primary standard-button inpage-scroll inpage_scroll_btn"> <span class="screen-reader-text">Header button label:Download Now</span> Download Now </button>
I installed this template on my website, indicate in the settings the transition I need to the link /gallery
- somewhere in the subject cant, does not go. Okay, I found in the code the section with the code I need, I write the same way in onclick
in this way
<?php $parallax_one_header_button_link = get_theme_mod('parallax_one_header_button_link','/gallery'); echo '<button id="inpage_scroll_btn" class="btn btn-primary standard-button inpage-scroll" onclick="'.$parallax_one_header_button_link.'"><span class="screen-reader-text">'.esc_html__('Header button label:', 'parallax-one').$parallax_one_header_button_text. '</span>'.$parallax_one_header_button_text.'</button>'; ?>
with a variable or by specifying the full path onclick="parent.location='http://themeisle.com/themes/parallax-one/'"
- but onclick
does not work and does not go to the page, even though the editor displays the path correctly.
get_theme_mod
will give out/gallery
- that is, the default is Blacknifeonclick="parent.location='http://мой_сайт/gallery'
problem is that nothing happens when the user clicks and it does not go anywhere .. - Vasya