Tagged: x
-
AuthorPosts
-
November 13, 2016 at 12:11 am #1254961
ibracedirector2016ParticipantI’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 // =============================================================================November 13, 2016 at 2:36 am #1255020
ChristopherModeratorHi 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.
November 13, 2016 at 11:27 pm #1255878
ibracedirector2016ParticipantHi, 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
November 14, 2016 at 12:06 am #1255906
DarshanaModeratorHi 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.
-
AuthorPosts
- <script> jQuery(function($){ $("#no-reply-1254961 .bbp-template-notice, .bbp-no-topic .bbp-template-notice").removeClass('bbp-template-notice'); }); </script>
