How to insert a div widget into a post? wordpress editor

Posted in: Newspaper
Post count: 234

Hi Tagdiv team,
I have a very simple question, how do I insert a div widget like that into a post with the standard wordpress editor? (without using elementor)
<div data-gyg-widget=”auto” data-gyg-partner-id=”ICEQY2Y”></div>

I know how to do it for a page but I am struggling to add this GetYourGuide widget into a post.

Thank you in advance for your advice.

Post count: 27744

Hello,

You can try to use the element custom HTML from the Gutenberg editor.

Thank you!

Post count: 234

Hi Anamaria,
It doesn’t seem to work for me. Is it working for you if you use that code?

<div data-gyg-href=”https://widget.getyourguide.com/default/city.frame&#8221; data-gyg-location-id=”200″ data-gyg-locale-code=”en-US” data-gyg-widget=”city” data-gyg-partner-id=”ICEQY2Y”></div>

Second question: Where should I paste this code below into the <head> of every page in order to visualise the widget.
head

View post on imgur.com

Post count: 27744

Hi,

Please let me know from where you have this code and what it should be displayed.
The code needs to be set between head tags, this can be set in our theme in Theme Panel -> Analytics/Js Codes. Example: https://prnt.sc/1tju9qf -> https://prnt.sc/10jk7fq

Thank you!

Post count: 234

Thank you so so much it worked! You’re the best 🙂

I have inserted the first div code into a post with: custom HTML from the Gutenberg editor

And I have copy/pasted the 2nd script into the Theme Panel -> Analytics/Js Codes and now the widget is properly displayed.

I am getting this code from the website getyourguide.com to promote activities through the affiliate program.

You can check the result here : https://australie.bucket-list.fr/visiter-sydney-le-guide-complet-des-incontournables/

Just under: Découvrez les activités à faire Sydney

Thank you!!!

Post count: 27744

Hello,

I’m glad that is resolved.

Have a great day!

Viewing 6 posts - 1 through 6 (of 6 total)
The forum ‘Newspaper’ is closed to new topics and replies.