Ning Network Tips - Archived Tips

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.


VIP

NING TIPS: Add ADs only in main page, profile pages or any other pages

Sometimes you may want ADs or special contents display in the main page, profile pages or any other pages only. It's easy to display contents only in main page. Because you could add a text box that only show in main page. But how to control contents only display in profile pages but not in main page and any other pages? And how to control contents display in every pages except the main page and profile pages? Actually it's very easy. You just need a little CSS. 

 

Here are the steps:

1. Add a text box for all pages.

2. Edit the text box in HTML mode, put all content/ad inside a div tag with a special unique id:

<div id="ad_sidebar01">
.... Your content or ad code here .... 
</div>

 

3. Go to the Advance CSS, add this CSS code if you don't want it display in the main page but any other pages:

.xg_widget_main #ad_sidebar01 {display:none;}

 

Or this CSS code if you don't want it display in all profile pages:

.xg_widget_profiles_profile #ad_sidebar01 {display:none;}

 

If you add both, the content will display in every pages except the main page and profile pages.

 

4. If you want it display in profile pages only, use this code:

#ad_sidebar01 {display:none;}
.xg_widget_profiles_profile #ad_sidebar01 {display:block;}

 

Remember to replace #ad_sidebar01 with yours.

 

 

 

This tips is tested with both Design Studio and old themes.

Load Previous Replies
  • up

    Fantagiro43

    This TIP is great. Thank you for share.
    • up

      Dr. Husky

      This tip is awesome!!!! but.... it is for Sidebar only

      What about for the top box (or above ad-box)?

      I've tried everything without success. or where to find the solution?

      Thank you so much jen and Alex, you are the best!

      • up

        Dr. Husky

        For example, in the ad box:  xg_ad_above_header

        4