S
S
Slink1232019-04-02 12:22:47
WordPress
Slink123, 2019-04-02 12:22:47

WordPress - where to insert the script to display tours from the tour operator?

Good afternoon, site on Wordpress 5.1.1. I need to place tours from the tour operator on my website, the tour operator provided the code, in which file or where should I insert it, so that I would have information from their website on the right page?

<div id=»algolTours»></div><script type=»text/javascript»>var algTS = document.createElement(‘script’); algTS.type = ‘text/javascript’; algTS.src = ‘http://www.algol.com.ua/export/js/tours.js.php?inframe=1&view=li&lang=448&filter_countries[]=146&groupBy=&TID=0&PC=EUR&a=35982&ac=acb43c970d8df5e691cff3b1e0b6af39’; var algTSc = document.getElementById(‘algolTours’); algTSc.parentNode.insertBefore(algTS, algTSc);</script>

there is another option through iframe, but for some reason it displays an empty area, although for example a video from YouTube normally shows. I changed the theme, disabled all plugins and still does not display through the iframe
<iframe src=»http://www.algol.com.ua/tours/tours_m.php?inframe=1&PC=UAH&a=35982&ac=acb43c970d8df5e691cff3b1e0b6af39&filter_countries[]=146&groupBy=&TID=0″ width=»100%» height=»1300″ frameborder=»0″></iframe>

Answer the question

In order to leave comments, you need to log in

2 answer(s)
C
Crash XD, 2019-04-02
@crashxd

where to put the script

Depends on where on the page/pages you want to show them.
The script is completely independent and inserting it anywhere in the page body works correctly. To be perverted with iframe does not make sense.

S
Sergey Kotov, 2019-04-02
@liqrizz

<div id="algolTours"></div>Here it put where it is necessary for example on the main page.

<script type="text/javascript">var algTS = document.createElement(‘script’); algTS.type = ‘text/javascript’; algTS.src = ‘http://www.algol.com.ua/export/js/tours.js.php?inframe=1&view=li&lang=448&filter_countries[]=146&groupBy=&TID=0&PC=EUR&a=35982&ac=acb43c970d8df5e691cff3b1e0b6af39’; var algTSc = document.getElementById(‘algolTours’); algTSc.parentNode.insertBefore(algTS, algTSc);</script>
put this in the footer.php of your theme

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question