This Group contains archived Ning Tips. To add a new tip, please go here: Add Ning Tips & Tricks
To view new Ning Tips go here: Ning Tips & Tricks Forum.
How To Add Content to Your Header:
Summary - Prepare your content and add to an external HTML. Call into your Network Header via Analytics Box, using an iframe and JavaScript.
EXAMPLE #1:
ADD CONTENT BELOW MENU NAVIGATION BAR:
<script type="text/javascript">
x$("#xg_navigation").after("<div id='custom_ads'></div>");
var ad_html = '<iframe frameborder="0" scrolling="no" allowtransparency="true" marginheight="0" marginwidth="0" src="your_custom.html" width="955px" height="100px"></iframe>';
x$("#custom_ads").html(ad_html);
</script>
EXAMPLE #2:
ADD CONTENT BELOW NINGBAR:
Note: For some reason, the centering had to added to the script, in this case.
<script type="text/javascript">
x$("#xn_bar").after("<div align=center id='custom_ads'></div>");
var ad_html = '<iframe frameborder="0" scrolling="no" allowtransparency="true" marginheight="0" marginwidth="0" src="your_custom.html" width="955px" height="100px"></iframe>';
x$("#custom_ads").html(ad_html);
</script>
Administrator☼JenSocial
Thanks
Jan 19, 2010
Mandy G.
Hi Jen, Quick question: Anytime I add an iframe and embed a html file (that's located on another server) I always add target="_blank" so they don't open within the iframe. The contents of the html include nav links that open in new windows and it's kind of annoying, lol.
Would you be able to help? How can I change it so the links open in the same window but not within the iframe.
Also, when I open this in my mobile, I can only see the logo and not the nav links..Do I need to add something to the code?
I know you're super busy and any help would be greatly appreciated.
See it here.
P.S. I know this article was written quite some time ago, but I used this tip anyway, to spruce up my 2.0 site until I get things going with the 3.0 site =)
Thanks, Mandy
Jul 16, 2013
Predestined by God
Hi Jen! Is it possible to add a photo so that I can get a visual picture of what exactly it is I am working with. Is this code for doing this?
Jan 14, 2015