I know this may sound strange but I have a nice slider as a banner so I don't need an ad box on the main page. 

Anyone know a way to hide an ad box from ONLY the main page? 

Thanks in advance for sharing.

David 

Tags: ad, box, hide, main, page

Views: 94

Reply to This

Replies to This Discussion

As far as I can see there is no parent class of the ad box that identifies it as being on the main page like other module so i've had to use some script. not ideal as it'll do that old Ning favourite of 'now you see it now you don't' when the script runs LAST!

Anyway, try this, assuming you've got the ad box above header. replace http://www.yourmainpageurl.com':

<!-- Remove Top Ad Box from Homepage -->

<script type="text/javascript">
x$(document).ready(function() {
if (window.location == 'http://www.yourmainpageurl.com')
x$("#xg_ad_above_header").remove();
});
</script>

Put in Custom Code

SP

SweetPotato,

Thanks a million and I'll try that. I understand what you mean and will see what the load times are. 

Hopefully Ning is listening and will give us options for restricting ad boxes on certain parts of the site (I know that many want it to not appear on profile pages - based on the threads of this forum). 

cheers,

David 

RSS

What's Up With Ning 3.0?

Click here to share your thoughts on what features we should develop next! - Survey will close Friday, 4/25

Projects that the Ning 3.0 Team is currently working on: 

Articles - a new way of organizing longer content pieces. Released 4/16.

Activity Feed Updates - options for more content in the activity feed.

Forum Notifications - ability for members to opt into receiving notifications of new discussions in forums. Released 4/9. 

APIs - The ability to create new members and content programatically.

For more information on what's next, visit the Product Roadmap

Latest Activity

soaringeagle replied to Phil McCluskey's discussion 'Introducing Articles and the Author Bio Box'
"nah was a good tip for blogs and forums..and articles if reed mores added later but the point is…"
40 minutes ago
soaringeagle replied to Phil McCluskey's discussion 'Introducing Email Notifications for Blogs and Forums'
"well in groups i see a point in that when they join a group as part of the join process there…"
45 minutes ago
Kos replied to Phil McCluskey's discussion 'Introducing Articles and the Author Bio Box'
"oops sorry.  Didn't catch that.  Will delete my blurp"
48 minutes ago
Skye replied to Phil McCluskey's discussion 'Introducing Email Notifications for Blogs and Forums'
"This was my issue as well and I guess from what I am seeing and reading it is not going to be a…"
50 minutes ago
soaringeagle replied to Phil McCluskey's discussion 'Introducing Articles and the Author Bio Box'
"thats for blogs/forums tho right theres no read more that i can see on articles"
1 hour ago
Kos replied to Phil McCluskey's discussion 'Introducing Articles and the Author Bio Box'
"Just jumping in here but you guys can enhance that "read more" a bit in Language Editor…"
1 hour ago

NC for Hire
Garfield Creator replied to soaringeagle's discussion 'simple tweak that ning can do to drasticly increase joins/growth'
"Good one!"
3 hours ago
Dutchlabel replied to Dutchlabel's discussion 'Align images horizontally'
"Kinda at least.. The code is ok, now Ning just ***** it up.. And I was trying to place this code in…"
3 hours ago

© 2014   Created by Ning.

Badges  |  Report an Issue  |  Terms of Service