Skip to main content

Do I have to have a column_2 layout activated in order to publish widgets/snipets?

Do I have to have a supporeter_nav // column_2 layout activated  in order to publish twitter and facebook streams, as well as google maps?  Because when I copy paste javascript widgets/snippets  to the footer they do not display. For example I copy-pasted the twitter widget code in the footer in layout.html:
 

<li class="column4">

     <a class="twitter-timeline" href="https://twitter.com/vaninatsoneva" data-widget-id="295638996594335744">Tweets by @vaninatsoneva</a><script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0];if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src="//platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js,fjs);}}(document,"script","twitter-wjs");</script>

</li>

But then when I go to my nation I can only see the title of the widget. Does this mean that I can insert snippets only in the column_2 file and format?

Official response from

No. You are able to insert javascript and HTML snippets into any template file within NationBuilder, with special attention paid to scripts embedded on secure pages. 

I just pasted this on your website, above the other code you provided and it's displaying properly:

< a class="twitter-timeline" href="https://twitter.com/vaninatsoneva" data-widget-id="297501874993635328">Tweets by @vaninatsoneva< /a>
< script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0];if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src="//platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js,fjs);}}(document,"script","twitter-wjs");< /script>

I think the problem here might have been that the proper domain was not defined in the twitter widget maker. Until you switch to a custom domain, the website you are building is located at vanina.nationbuilder.com which is what needs to be indicated when creating the widget, otherwise it will not work.

Thanks.

Share this post

Showing 5 reactions

How would you tag this suggestion?
Please check your e-mail for a link to activate your account.