-
-
Using Handel theme, how can I set the buttons to open in a new window. I tried adding
target=”_new” in the cl_button markup but this did not work, and I can’t see an easy way to add it to the target. Is this something easy to do. I have lots of buttons for viewing Catalog on my site which is a PDF on a Google drive and I’d prefer these open in a new window / tab..
Thanks
-
Hello,
Please go to file \includes\codeless_builder\shortcodes\cl_button.php and find this line:
<a href="<?php echo esc_url( $link ) ?>" class="<?php echo esc_attr( $this->generateClasses('.cl-btn') ); ?> <?php echo esc_attr( $extra_classes ); ?>" <?php $this->generateStyle('.cl-btn', '', true) ?> > <span><?php echo cl_remove_empty_p( cl_remove_wpautop($btn_title, true) ) ?></span></a>
Replace with this:
<a href="<?php echo esc_url( $link ) ?>" target="_blank" class="<?php echo esc_attr( $this->generateClasses('.cl-btn') ); ?> <?php echo esc_attr( $extra_classes ); ?>" <?php $this->generateStyle('.cl-btn', '', true) ?> > <span><?php echo cl_remove_empty_p( cl_remove_wpautop($btn_title, true) ) ?></span></a>
Let me know.
Best regards! -
-
Hello!
How do i add the target _blank to specific buttons? I dont want all of my buttons to open in a new window just a few.
Regards,
Kim
-
Hello,
You can’t do that at the moment. We are going to add this feature to the next update of handel that will come shortly.
Regards!
-
-
You must be logged in to reply to this topic.