Get Even More Visitors To Your Blog, Upgrade To A Business Listing >>

Create a New Template and call them in Extra.less

Why are you filling up your extra.less Template when you can just create a new template for each of your modifications and then include this new template in your extra.less template in just one line.

check below image:

Which one are you? comment down

You can see on the left are things every newbie does – Adding all the custom codes in extra.less

while on the right is the best way to avoid clusters and confusion of the codes.

In this method, we just create a new template and include this template in extra.less

Let’s start:

For this we will go to Xenforo ACP > Appreance > Template.

Click on “Add Template

Name your template. Make sure that the name you select is unique and isn’t being used by any other templates. The name should end with .less

For reference, I will name it subforumin2grid.less since I will use them to change my subforums to a 2-column layout.

Now add your custom code in the text area and click save at the bottom

You have now created a Custom Template.

Now it’s time to call this template in your extra.less to work in the forum.

Go to extra.less template same path as earlier

Add the below code to call your custom template in extra.less

{{ include('subforumin2grid.less') }}

Change “subforumin2grid.less” with the template name you assigned

calling the custom template in xenforo

Click SAVE and done.

You have now learned how to create a custom template in Xenforo and include them in the working style.

Share this with someone who needs it. See you soon with another useful post !!



This post first appeared on GeekySameer, please read the originial post: here

Share the post

Create a New Template and call them in Extra.less

×

Subscribe to Geekysameer

Get updates delivered right to your inbox!

Thank you for your subscription

×