Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #701515

    My chat plugin needs me to add this code to the footer.php (i did that)

    <script>
    // Chatra widget code
    </script>
    
    <script>
    jQuery(function () {
        // Bind event on button click
        jQuery('#custom-chatra-button').on('click', function() {
            // Open chat and focus input field
            Chatra('openChat', true);
        });
    });
    </script>

    Then add this code to the button that would trigger the chat window to open, i’m not sure how to add this to my enfold button

    <!-- Custom button anywhere on the page -->
    <button id="custom-chatra-button">Open chat window</button>

    See private for where the button is

    #701518

    Hey kilimats!

    Please add following code to Functions.php file in Appearance > Editor

    function av_custom_tps(){
    ?>
    <script>
    // Chatra widget code
    </script>
    
    <script>
    jQuery(function () {
        // Bind event on button click
        jQuery('#custom-chatra-button').on('click', function() {
            // Open chat and focus input field
            Chatra('openChat', true);
        });
    });
    </script>
    <?php
    }
    add_action('wp_footer', 'av_custom_tps');

    Then add following code to text widget, text tab of Text Block element or into Code Block element

    <!-- Custom button anywhere on the page -->
    <button id="custom-chatra-button">Open chat window</button>

    Cheers!
    Yigit

    #701521

    thanks the trigger works ! now how can i style it the same as the default enfold button?

    #701523

    also is it possible to only show the button during a specific daily timeframe?

    #701851

    Hi,

    1- Button is not visible on my end. Have you removed it?
    Please create a testing page with your button and example button so we can provide you accurate custom CSS code.

    2- Unfortunately it would require quite some time and customization of the theme to achieve this, so I am sorry to tell you that this is not covered by our support. However if its really important for you to get this done, you can always hire a freelancer to do the job for you :)

    Best regards,
    Yigit

Viewing 5 posts - 1 through 5 (of 5 total)
  • You must be logged in to reply to this topic.