XF 2.0 Adding sidebar (with ads) to New Posts and Latest Activity pages

sophie1204

Active member
I've been able to add a sidebar with ads to Forum View and Threadview pages, but it's not drilling down to the pages for New Posts and Latest Activity. What can I do to add a sidebar there, and which designation would I use to add an ad in the advertising set-up?
 
Create an html widget that contains your ad code. In your template whats_new_posts and latest_activity add that widget (at the top) with sidebar position:

Code:
<xf:widget key="your_widget_key" position="sidebar" />
 
Last edited:
Or, if you just want a sidebar with various xf widgets you can create an html widget that contains the other xf widgets, and then place that in the template and sidebar position as above,.

So within your html widget template, you have something like this:

Code:
<xf:widget key="forum_overview_members_online" />
<xf:widget key="forum_overview_forum_statistics"  />
<xf:widget key="xfrm_forum_overview_new_resources"  />

Then, as mention above your ad code will show there provided you used position="sidebar" in the new posts template
 
Create an html widget that contains your ad code. In your template whats_new_posts and latest_activity add that widget (at the top) with sidebar position:

Code:
<xf:widget key="your_widget_key" position="sidebar" />

Thanks for this. You have to excuse me -- I'm about as non-technical as you can get -- but do you mean replace "your_widget_key" with the ad code? What if you have a number of ads you want to put in? I'm sorry, but I'm confused.
 
Thanks for this. You have to excuse me -- I'm about as non-technical as you can get -- but do you mean replace "your_widget_key" with the ad code? What if you have a number of ads you want to put in? I'm sorry, but I'm confused.

No, the ad code is pasted into the html widget.

When you create the widget you are prompted to give it a key.

It could be "trevor" - it's just a name you can use when you reference it in the template so it could be

Code:
<xf:widget key="trevor" position="sidebar" />
 
Back
Top Bottom