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 🙂
If you need services beyond standard support, we've got your back!
If you'd prefer not to handle the installation yourself or need help getting started, we'll set everything up for you.
We'll help you rearrange sections, adjust spacing, and modify the page structure to fit your needs.
More complex styling changes, theme option modifications, and third-party integrations.
If you need something that's not included in the theme, we can code it for you.
Web design services to create custom sections, pages, and blocks for your theme, plus graphics and visualizations.
Full website builds, custom theme development, or plugin creation from scratch.
We'll provide a clear quote based on what you need. No hidden fees.