Tagged: x
-
AuthorPosts
-
March 29, 2016 at 9:11 am #856864
mathijs84ParticipantHi guys,
I am developing a new site on http://www.streamads.work-planning.com/
They want an example of their video product. To demo it, they send me this code:
TAG:
<script type=”text/javascript” id=”eannativeembedtag” src=”http://cdn.elasticad.net/native/serve/js/nativeEmbed.gz.js”></script>I want to add it to this page http://www.streamads.work-planning.com/producten/inarticle-video/ under the lorem ipsum text.
Any idea how i can do this?
March 29, 2016 at 11:29 am #857102
RupokMemberHi there,
Thanks for writing in! You can follow this to add custom script to your site : https://community.theme.co/forums/topic/add-tracking-code-to-header/#post-776299
Hope this helps.
Cheers!
March 30, 2016 at 4:00 am #858373
mathijs84ParticipantOk thanks,
Not sure if completely correct, but i added this to the functions.php of Child Theme:
function my_custom_head_output() { ?> <script type="text/javascript" id="eannativeembedtag" src="http://cdn.elasticad.net/native/serve/js/nativeEmbed.gz.js"></script> <?php } add_action( 'wp_head', 'my_custom_head_output');
Is that correct??
And now how do i add it to this page: http://www.streamads.work-planning.com/producten/inarticle-video/
March 30, 2016 at 5:24 am #858463
Paul RModeratorHi,
Yes that’s correct but the code will add it to all your pages.
If you want it to be added only on that page you can change the code to this.
function my_custom_head_output() { if(is_page(72)): ?> <script type="text/javascript" id="eannativeembedtag" src="http://cdn.elasticad.net/native/serve/js/nativeEmbed.gz.js"></script> <?php endif; } add_action( 'wp_head', 'my_custom_head_output'Thanks
March 30, 2016 at 5:55 am #858499
mathijs84ParticipantOk i changed that, but i am still not quite sure how i can get this visible at that page.
Do i need to include an element on the page where i want to show it. (it is a demo video)
March 30, 2016 at 6:27 am #858549
FriechModeratorHi There,
You can check if you successfully enqueue that script on your page by doing a view source (ctrl + u) and then finding (ctrl + f) the
http://cdn.elasticad.net/native/serve/js/nativeEmbed.gz.jsstring.It seems the instruction to you is incomplete, commonly those kind of JavaScript is paired with a HTML markup to actually output the element (video) itself. The script is only for requesting this file http://cdn.elasticad.net/native/serve/js/nativeEmbed.gz.js
Hope it helps, Cheers!
March 31, 2016 at 3:01 am #860389
mathijs84ParticipantOk i will try to get it from them!!
If i also want to add the script to this page http://www.streamads.work-planning.com/producten/innative/
what should i add to the script??
March 31, 2016 at 4:36 am #860518
LelyModeratorHi There,
You can update the script to this:
function my_custom_head_output() { if(is_page(72) || is_page(76)): ?> <script type="text/javascript" id="eannativeembedtag" src="http://cdn.elasticad.net/native/serve/js/nativeEmbed.gz.js"></script> <?php endif; } add_action( 'wp_head', 'my_custom_head_output'Hope this helps.
April 6, 2016 at 8:30 am #869256
mathijs84ParticipantOk thanks,
They created a demo and send me this link: http://www.streamads.work-planning.com/producten/innative/?ean-test-native=true&ean-pid-only=24201
Now they say the position is a bit low. Can i put the script higher or create a div that they can connect to the Tag
Any idea how we can manage that?
April 6, 2016 at 12:05 pm #869673
JadeModeratorHi there,
Looks like the action hook that was used to add the code in the page is wp_footer.
Kindly try to check on your child theme and find the code that looks something like this
add_action( 'wp_footer', 'my_custom_head_output');then change it toadd_action( 'x_after_site_begin', 'my_custom_head_output');If you’re not able to find the code, 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
– FTP credentialsDon’t forget to select Set as private reply. This ensures your information is only visible to our staff.
April 7, 2016 at 3:51 am #870796
mathijs84ParticipantThis reply has been marked as private.April 7, 2016 at 4:21 am #870832
mathijs84ParticipantAlso i need to add this code:
<script type="text/javascript"> window._ttf = window._ttf || []; _ttf.push({ pid : 49968 ,lang : "en" ,slot : '.x-container .x-column .x-img' ,format : "inread" ,minSlot : 1 ,components : { skip: {delay : 0}} ,mutable : true ,css : "margin: 0px 0px 19.695px;" ,BTF : false }); (function (d) { var js, s = d.getElementsByTagName('script')[0]; js = d.createElement('script'); js.async = true; js.src = '//cdn.teads.tv/media/format.js'; s.parentNode.insertBefore(js, s); })(window.document); </script>To this page: http://www.streamads.work-planning.com/producten/inarticle-video/
April 7, 2016 at 8:48 am #871175
ZeshanMemberHi there,
Please also provide us with the FTP credentials so we can check the backend files of your site.
Thank you!
April 7, 2016 at 10:05 am #871292
mathijs84ParticipantThis reply has been marked as private.April 7, 2016 at 10:29 pm #872260
RadModeratorHi there,
Another support here and made the changes required to your child theme’s functions.php
The second code works, the ads is now playing with in the content of http://www.streamads.work-planning.com/producten/inarticle-video/
But the first one isn’t, should we expect something?
Thanks!
-
AuthorPosts
- <script> jQuery(function($){ $("#no-reply-856864 .bbp-template-notice, .bbp-no-topic .bbp-template-notice").removeClass('bbp-template-notice'); }); </script>
