Navigation
This is archived content. Visit our new forum.

Tagged: 

  • Author
    Posts
  • #1254961
    ibracedirector2016
    Participant

    I’m trying to implement the following API into my website http://support.causevox.com/article/96-widget-api-documentation

    I’ve tried to put the following in my Child Theme’s functions.php file but it doesn’t seem to be working.

    website: http://www.projectneverest.com

    <?php
    
    // =============================================================================
    // FUNCTIONS.PHP
    // -----------------------------------------------------------------------------
    // Overwrite or add your own custom functions to X in this file.
    // =============================================================================
    function my_head_custom_code() { ?>
    
    <script type="text/j.avascript" src="//js.causevox.com/v2"></script>
    
    <script type="text/javascript">
    
    CV.setDomain("projectneverest.causevox.com");
    
    </script>
    
    <?php }
    
    add_action( 'wp_head', 'my_head_custom_code' );
    // =============================================================================
    // TABLE OF CONTENTS
    // -----------------------------------------------------------------------------
    //   01. Enqueue Parent Stylesheet
    //   02. Additional Functions
    // =============================================================================
    
    // Enqueue Parent Stylesheet
    // =============================================================================
    
    add_filter( 'x_enqueue_parent_stylesheet', '__return_true' );
    
    // Additional Functions
    // =============================================================================
    
    #1255020
    Christopher
    Moderator

    Hi there,

    Please update your code to :

    <?php
    
    // =============================================================================
    // FUNCTIONS.PHP
    // -----------------------------------------------------------------------------
    
    // =============================================================================
    // TABLE OF CONTENTS
    // -----------------------------------------------------------------------------
    //   01. Enqueue Parent Stylesheet
    //   02. Additional Functions
    // =============================================================================
    
    // Enqueue Parent Stylesheet
    // =============================================================================
    
    add_filter( 'x_enqueue_parent_stylesheet', '__return_true' );
    
    // Additional Functions
    // =======
    
    // Overwrite or add your own custom functions to X in this file.
    // =============================================================================
    function my_custom_js() { ?>
    
    <script type="text/j.avascript" src="//js.causevox.com/v2"></script>
    
    <script type="text/javascript">
    
    CV.setDomain("projectneverest.causevox.com");
    
    </script>
    
    <?php }
    
    add_action( 'wp_footer', 'my_custom_js', 100 );

    Hope it helps.

    #1255878
    ibracedirector2016
    Participant

    Hi, thanks for that. Unfortunately it still isn’t working, It says in the API docuemntation that it needs to be on the page before the </head>' tag of the page. Does the above code achieve this? Thanks for taking the time to help me again.

    Jackson

    #1255906
    Darshana
    Moderator

    Hi there,

    Please use the following code instead, so that it will load before the </head> tag.

    
    function my_custom_js() { ?>
    
      <script type="text/j.avascript" src="//js.causevox.com/v2"></script>
      <script type="text/javascript">
      CV.setDomain("projectneverest.causevox.com");
      </script>
    <?php }
    add_action( 'wp_head', 'my_custom_js', 100 );
    

    Hope that helps.

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