Tagged: x
-
AuthorPosts
-
February 27, 2017 at 11:24 am #1387542
neilandroidParticipantHi. My client has supplied me with code for a booking widget. Is there a way within X that I can display this as a pop-up or lightbox over the main content?
I already have a custom booking link set up in the header (currently as a mailto:). I wish to show the booking widget when this link is clicked.
February 27, 2017 at 11:27 am #1387547
neilandroidParticipantThis reply has been marked as private.February 27, 2017 at 11:33 am #1387559
RupokMemberHi there,
It depends on the code. You can try using within Raw Content. If you can share your code then we can suggest the best way to use them.
Cheers!
February 27, 2017 at 2:23 pm #1387805
neilandroidParticipantThis reply has been marked as private.February 28, 2017 at 12:11 am #1388324
ChristopherModeratorHi there,
Please add the script code in a separate page in raw content element.
Update your code in header to :[x_button class="custom-btn" href="Add page's URL here"] [x_lightbox selector=".custom-btn"]Hope it helps.
February 28, 2017 at 5:51 am #1388618
neilandroidParticipantThanks, please can you confirm in which file I should add this code. I’m using a modified _navbar.php and _nav-primary.php in my child theme currently.
February 28, 2017 at 9:33 am #1388894
JadeModeratorHI there,
You may add the code provided previously in a Raw Content element in Cornerstone.
Let us know how it goes.
February 28, 2017 at 10:45 am #1388976
neilandroidParticipantI’ve added that code into a raw content element, but don’t know where to add the following:
[x_button class=”custom-btn” href=”Add page’s URL here”]
[x_lightbox selector=”.custom-btn”]I’m assuming that this needs to replace my custom mailto?
Thanks
February 28, 2017 at 11:14 am #1389029
JoaoModeratorHi There,
You can add the code to the Raw Code Element in Cornerstone.
Alternatively, you can add just this code to a raw content in Cornerstone:
[x_lightbox selector=".custom-btn"]Than add a button element, add the class: custom-btn to the button element
and add to the href of the button the page that you want to open in the lightbox
Hope it helps
Joao
February 28, 2017 at 12:34 pm #1389124
neilandroidParticipantHi Joao
Sorry, I’m not following you. I have set up a new page (as URL supplied above + /bookingform/) and added the OpenTable widget script in a raw content element. Do I add [x_lightbox selector=”.custom-btn”] to this same raw content element?
Also, I’m not using a button element, I want to reassign the custom mailto in my nav bar to open the widget. This currently uses the following code in my child theme’s _nav-primary.php:
</div>
<div class=”custommailto”>BOOK A TABLE</div>
how would I assign the custom-btn class to this?Thanks
February 28, 2017 at 12:39 pm #1389130
JoaoModeratorWould you mind providing us with login credentials so we can take a closer look? To do this, you can make a post with the following info:
– Link to your site
– WordPress Admin username / passwordDon’t forget to select Set as private reply. This ensures your information is only visible to our staff.
Thanks
February 28, 2017 at 12:46 pm #1389142
neilandroidParticipantThis reply has been marked as private.February 28, 2017 at 1:31 pm #1389189
JoaoModeratorHi There,
I have placed your script on this page > http://test3.warehausstudio.co.uk/make-a-reservation
I have setup a button that launches the page above here:
http://test3.warehausstudio.co.uk/?page_id=224
Hope that helps
Joao
February 28, 2017 at 4:58 pm #1389320
neilandroidParticipantThanks, that’s helpful for understanding how the page with the widget code on needs to work, but what I’m trying to achieve is for the ‘BOOK A TABLE’ link in the nav bar to have the behaviour that the button you created has (‘click me!’)
I’m assuming this would need to be done in the _nav-primary.php file?
March 1, 2017 at 1:54 am #1389873
ChristopherModeratorHi there,
How did you add it? Did you add it in _navbar-primary.php file?
If so, please connect to FTP and instead of Book a table link add following code:<?php echo do_shortcode('[x_button class="custom-btn" href="http://test3.warehausstudio.co.uk/make-a-reservation/"]Book a table[/x_button][x_lightbox selector=".custom-btn"]'); ?>Hope it helps.
-
AuthorPosts
- <script> jQuery(function($){ $("#no-reply-1387542 .bbp-template-notice, .bbp-no-topic .bbp-template-notice").removeClass('bbp-template-notice'); }); </script>
