Navigation
This is archived content. Visit our new forum.

Tagged: 

  • Author
    Posts
  • #1387542
    neilandroid
    Participant

    Hi. 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.

    #1387547
    neilandroid
    Participant
    This reply has been marked as private.
    #1387559
    Rupok
    Member

    Hi 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!

    #1387805
    neilandroid
    Participant
    This reply has been marked as private.
    #1388324
    Christopher
    Moderator

    Hi 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.

    #1388618
    neilandroid
    Participant

    Thanks, 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.

    #1388894
    Jade
    Moderator

    HI there,

    You may add the code provided previously in a Raw Content element in Cornerstone.

    Let us know how it goes.

    #1388976
    neilandroid
    Participant

    I’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

    #1389029
    Joao
    Moderator

    Hi 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

    #1389124
    neilandroid
    Participant

    Hi 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

    #1389130
    Joao
    Moderator

    Would 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 / password

    Don’t forget to select Set as private reply. This ensures your information is only visible to our staff.

    Thanks

    #1389142
    neilandroid
    Participant
    This reply has been marked as private.
    #1389189
    Joao
    Moderator

    Hi 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

    #1389320
    neilandroid
    Participant

    Thanks, 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?

    #1389873
    Christopher
    Moderator

    Hi 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.

  • <script> jQuery(function($){ $("#no-reply-1387542 .bbp-template-notice, .bbp-no-topic .bbp-template-notice").removeClass('bbp-template-notice'); }); </script>