Home › Forums › Jevelin Theme › How to make "purchase package" button open in new window?
Home › Forums › Jevelin Theme › How to make "purchase package" button open in new window?
Hi, I have another page where I would like the “purchase package” button to open in a new window (and not in the current window like it does). Here is the screenshot (from http://www.danataft.com/yoga/packages/)
Thanks!
Thank you for your question.
I tried to access your shared site but it is displaying the message “New Website Coming Soon”.
Could you please either disable it or would you mind if i log in to your site and access it? If this is ok then could you please share me your site log in details privately by adding them in the box having text “Click here to share private content. Only you and forum moderators will bee able see it.”?
Best regards,
Shufflehound team
Yes, it is disabled now: http://www.danataft.com/yoga/packages/
To achieve this please add following custom code in the bottom of functions.php file of child theme that you are using on your site.
function add_pricing_button_custom_scripts(){ ?>
<script type="text/javascript">
jQuery(document).ready(function($){
$("#page-container .sh-pricing-content-center a.sh-pricing-butto").attr("target","_blank");
});
</script>
<?php }
add_action('wp_footer', 'add_pricing_button_custom_scripts', 99);
Hi there, I did add this to the functions.php of my child theme, but it did not work (see link for code screenshot in private section)
Any other thoughts?
Solution for this topic
Could you please try using below CSS code instead of above shared?
function add_pricing_button_custom_scripts(){ ?>
<script type="text/javascript">
jQuery(document).ready(function($){
$("#page-container .sh-pricing-content-center a.sh-pricing-button").attr("target","_blank");
});
</script>
<?php }
add_action('wp_footer', 'add_pricing_button_custom_scripts', 99);
That worked wonderfully!! Thank you!!
You are most welcome here 🙂