Tagged: 

Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #1174695

    I am trying to add this code
    <script type=”text/javascript”>
    var _userway_config = {
    account: ‘nYMqWNnani’
    };
    </script>
    <script type=”text/javascript” src=”https://cdn.userway.org/widget.js”></script&gt;

    I looked for appearance editor but there is not one on this install for some reason how would I either add the appearance/editor or this code to my files?

    #1174919

    Hey Jay,

    Please try this in your functions.php file:

    function add_userway_code(){
    ?>
    YOUR CODE GOES HERE
    <?php
    }
    add_action('wp_footer', 'add_userway_code');

    Best regards,
    Rikard

    #1175140

    Unfortunately this caused a fatal error, This needs to be just before the /body perhaps putting in the footer was the issue.

    #1175142

    Hi,

    Did you add the code to the end of the functions.php file?

    Best regards,
    Jordan Shannon

    #1175158

    Yes I did I tried both the child theme function.php and the enfold.

    #1175270

    Hi,

    Where can we check the files in question?

    Best regards,
    Rikard

    #1175732

    Hi not worth the time or trouble for a plugin that is ADA compliant I will check on another site of mine with the divi theme and see if it is the theme or the script causing the error. but basically not that worried about it at this time.

    #1175754

    Can you try it this way in child-theme functions.php:

    add_action( 'wp_enqueue_scripts', 'enqueue_userway_code' );
    function enqueue_userway_code() {
      wp_enqueue_script( 'userway', 'https://cdn.userway.org/widget.js' );
    }
    
    add_action('wp_footer', 'add_userway_code');
    function add_userway_code(){
    ?>
    <script type="text/javascript">
    	var _userway_config = { account: 'nYMqWNnani'};
    </script>
    <?php
    }
Viewing 8 posts - 1 through 8 (of 8 total)
  • You must be logged in to reply to this topic.