XF 2.3 How to create/Add widget positions?

mrdoitnyce

Active member
Hey all,

I want to add more widget positions, specifically at the top above the forum and in the footer. Are add-ons already available for this? If not, How can I go about creating new positions?
 
Hey all,

I want to add more widget positions, specifically at the top above the forum and in the footer. Are add-ons already available for this? If not, How can I go about creating new positions?
You can place a widget in any location by editing the appropriate template and adding <xf:widget key="widget_key" /> - just substitute widget_key with the one you want to place. To find the key, edit the widget at Admin >> Appearance >> Widgets.
Another easy way to place the above Widget HTML is using Admin >> Setup >> Advertising - then pick a position.
 
Last edited:
Are add-ons already available for this? If not, How can I go about creating new positions?
No add-on(s) needed, it's a Core XF Development feature.

Admin CP >> Development >> Widget positions >> [Add widget position]

Note: Your site needs to be in Development Mode to access the Development Section in the Admin CP.

Selection_696.webp


Example...

Selection_697.webp

Note: You do not need to set an Add-on when you are just doing this for yourself on your site, just leave it empty.

Then you need to edit the template(s) where you want that Widget Position to located by using the XF widget position helper.

Example...
<xf:widgetpos id="xa_ims_index_above_items" />

Super simple :)
 
You can place a widget in any location by editing the appropriate template and adding <xf:widget key="widget_key" /> - just substitute widget_key with the one you want to place. To find the key edit the widget at Admin >> Appearance >> Widgets.
Yes, Thank you. But I was referring to the positions specifically. I've managed to find the top position, above the nodes which is apparently called " <xf:ad position="container_breadcrumb_top_above" /> " that can be found in page_container. I put the widget key Above that line of code and it's exactly where I wanted it to show up.

Now I just have to keep digging for the footer position.
 
No add-on(s) needed, it's a Core XF Development feature.

Admin CP >> Development >> Widget positions >> [Add widget position]

Note: Your site needs to be in Development Mode to access the Development Section in the Admin CP.

View attachment 322168


Example...

View attachment 322167

Note: You do not need to set an Add-on when you are just doing this for yourself on your site, just leave it empty.

Then you need to edit the template(s) where you want that Widget Position to located by using the XF widget position helper.

Example...
<xf:widgetpos id="xa_ims_index_above_items" />

Super simple :)
This is super informative, I'll have to enable development mode first. lol
 
Yes, Thank you. But I was referring to the positions specifically. I've managed to find the top position, above the nodes which is apparently called " <xf:ad position="container_breadcrumb_top_above" /> " that can be found in page_container. I put the widget key Above that line of code and it's exactly where I wanted it to show up.

Now I just have to keep digging for the footer position.
@Bob s post is great info.
Another easy way to place the Widget HTML is using Admin >> Setup >> Advertising - then pick a position.
 
Back
Top Bottom