Implement a Typeform Popup into Wordpress Menu | Community
Skip to main content
Answered

Implement a Typeform Popup into Wordpress Menu


hello :)

 

I would like to put a responsive typeform popup which I can use as link in my wordpress menu.

Can anyone explain me how to do so?

 

best wishes

Christine

Best answer by mathio-tf

Hello, you can build a button or link to open your popup in the share page and then put the embed code into your page where you want to display the button or link. If you need more complex functionality please see our embed lib docs on how to build a custom popup.

View original

11 replies

Liz
Community Team
Forum|alt.badge.img+5
  • Tech Community Advocate
  • 14858 replies
  • October 27, 2021

Hi @cschuler Happy Wednesday! Thanks for stopping by the community. Adding a popup to your Wordpress menu involves custom coding a button in the menu and custom coding the popup, which sadly we don’t have an out-of-box solution for. 

@mathio possibly has an example of this, but building this will largely depend on how you’ve already built your Wordpress site. :\


mathio-tf
Typeform
Forum|alt.badge.img+5
  • Typeform
  • 888 replies
  • Answer
  • November 1, 2021

Hello, you can build a button or link to open your popup in the share page and then put the embed code into your page where you want to display the button or link. If you need more complex functionality please see our embed lib docs on how to build a custom popup.


Forum|alt.badge.img+2
  • Sharing wisdom
  • 57 replies
  • February 8, 2022

Hello,
I am also intersted in this one, I want Wordpress Menu Button to launch a Typeform pop-up. Custom coding is fine, but some help is needed.

Wordpress Menu item is li element, and link is in a href attribute as indicated.

<li id="menu-item-37" 
class="menu-singup menu-item menu-item-type-custom menu-item-object-custom menu-item-37" 
data-tf-popup="Vxs1VOeK" 
data-tf-hide-header="" 
data-tf-transitive-search-params="utm_source, utm_medium,utm_campaign,utm_term,utm_content" data-tf-iframe-props="title=Dermatologo konsultacija internetu - iDerma" 
data-tf-medium="snippet">

<a href="https://form.typeform.com/to/Vxs1VOeK">Pradėti konsultaciją</a></li>

I have managed to add typform attributes to li element via Jquery, but it somewhat doesnt trigger launch of typform embed. Can anyone point any other solutions, how to make this li element to launch embed? Or it only can be a button that launches embed?


Forum|alt.badge.img+2
  • Sharing wisdom
  • 57 replies
  • February 17, 2022

@cschuler 

We have found a solution to this problem, it simply requres you to add custom code in DIVI - Theme options - Integration - Add code to the < head > of your blog

 

Our menu button which should trigger the Embed has id #menu-item-37

 

<link rel="stylesheet" href="//embed.typeform.com/next/css/popup.css" />
<script src="//embed.typeform.com/next/embed.js"></script>
<script>
jQuery(function($){
	$('#menu-item-37 a').click(function (e) {
		e.preventDefault();
 		var popup = window.tf.createPopup('sxmSCYSc', {
			hideHeaders: true,
			transitiveSearchParams: ['utm_source', 'utm_medium', 'utm_campaign', 'utm_term', 'utm_content'],
			iframeProps: {
				title: 'Dermatologo konsultacija internetu - iDerma'
			},
			medium: 'snippet',
			hidden: 'utm_source,utm_medium,utm_campaign,utm_term,utm_content'
		});
		popup.toggle();
	});
});
</script>

Hope this helps, 

Good luck


Liz
Community Team
Forum|alt.badge.img+5
  • Tech Community Advocate
  • 14858 replies
  • February 17, 2022

Thanks so much, @ValdemarQ !!


john.desborough
Forum|alt.badge.img+6
  • Certified Partner & Champion
  • 5262 replies
  • February 17, 2022

@ValdemarQ - gold mine! thank you

 


Forum|alt.badge.img+2
  • Sharing wisdom
  • 57 replies
  • March 17, 2022

The only thing I noticed, that unfortunately hidden params are not working in this solution, not clear why, working with developers to find out the possible reasons.
 

hidden: 'utm_source,utm_medium,utm_campaign,utm_term,utm_content'

 


Forum|alt.badge.img+2
  • Sharing wisdom
  • 57 replies
  • March 17, 2022

Some adjustment was needed, here it is:

 

jQuery(function($){

	$('#menu-item-37 a').click(function (e) {
		e.preventDefault();
 		var popup = window.tf.createPopup('sxmSCYSc', {
			hideHeaders: true,
			transitiveSearchParams: ['utm_source', 'utm_medium', 'utm_campaign', 'utm_term', 'utm_content', 'city'],
			iframeProps: {
				title: 'Dermatologo konsultacija internetu - iDerma'
			},
			medium: 'snippet',
			hidden: {
				utm_source: '',
				utm_medium: '',
				utm_campaign: '',
				utm_term: '',
				utm_content: '',
				city: ''
			}
		});
		popup.toggle();
	});
});

 


Liz
Community Team
Forum|alt.badge.img+5
  • Tech Community Advocate
  • 14858 replies
  • March 17, 2022

Thanks for sharing this, @ValdemarQ !


Gabi Amaral
Ex–Typefomer
Forum|alt.badge.img+5
  • Ex–Typefomer
  • 1778 replies
  • March 18, 2022

Let us know what you find out about the hidden params, @ValdemarQ


  • Navigating the Land
  • 1 reply
  • May 30, 2024

If I use Astra Pro how can I embed typeform un my menu?


Reply