Background Color for Category and Forum Nodes

Status

offline

Posts

49

Likes

83

Resources

3

Bits Credits

0

LEVEL

0

120 XP

Sometimes, we want different color for each category forum. So here simple css which you want to try.
Add to extra.less in your template.

Code:
/* Coloring Category and Node */
.block.block--category.block--categoryXX .block-header {
    background: -webkit-linear-gradient(335deg, #28356c 44%, #074946 64%, #21307a 100%);
}
.block.block--category.block--categoryXX .block-body {
    background: -webkit-linear-gradient(19deg, #161c31 0%, #30264b 44%, #213c40 58%, #13395a 76%, #272b56 100%);
}

XX is your category id. As we know, XF has unique id on url link. Just like this sub forum, the id is 55
Code:
https://nullforums.net/forums/xenforo-tips-guides.55/
Post automatically merged:

If you bored with unique id on url. Just for good looking or may SEO
In Admin backend, nodes. URL Portion (Optional) :

Code:
xenforo-tips-guides

It will give pretty url
Code:
https://nullforums.net/forums/xenforo-tips-guides/
 

FateKid

DEVIL DID IT

Status

offline

Posts

14,666

Likes

125,808

Resources

3,373

Bits Credits

363

Admin

LEVEL

11

5,910 XP

Sometimes, we want different color for each category forum. So here simple css which you want to try.
Add to extra.less in your template.

Code:
/* Coloring Category and Node */
.block.block--category.block--categoryXX .block-header {
    background: -webkit-linear-gradient(335deg, #28356c 44%, #074946 64%, #21307a 100%);
}
.block.block--category.block--categoryXX .block-body {
    background: -webkit-linear-gradient(19deg, #161c31 0%, #30264b 44%, #213c40 58%, #13395a 76%, #272b56 100%);
}

XX is your category id. As we know, XF has unique id on url link. Just like this sub forum, the id is 55
Code:
https://nullforums.net/forums/xenforo-tips-guides.55/
Post automatically merged:

If you bored with unique id on url. Just for good looking or may SEO
In Admin backend, nodes. URL Portion (Optional) :

Code:
xenforo-tips-guides

It will give pretty url
Code:
https://nullforums.net/forums/xenforo-tips-guides/
Awesome write-up on this! I love learning new things :)
 
Liked by:

Latest threads

Forum statistics

Threads
53,919
Messages
83,957
Members
50,524
Latest member
p1acement
Top Bottom