Notifications
Clear all

wpForo 1.x.x [Closed] Editing Recent Post widget

5 Posts
3 Users
3 Reactions
1,434 Views
Posts: 5
Topic starter
(@kfj1972)
Active Member
Joined: 6 years ago

Hi wpForo,

I think if you could help me with a little wish. I want two row-colors in the Recent Post widget.

Untill now I figure out that it most be in functions-template.php I have to add such row colours, even it would be perfect if could choose two hex row colours in the admin of the widget. But untill such functions in the widget, how can I do myself?

Thanks

KFJ1972

4 Replies
VereK
Posts: 522
(@verek)
Honorable Member
Joined: 7 years ago

@kfj1972

You can do it in CSS. Something along these lines (Where #000 is the colour you want as odd or even alternate)

#wpf-widget-recent-replies > div > ul > li:nth-child(odd) {
background-color: #000;
}
Posts: 5
Topic starter
(@kfj1972)
Active Member
Joined: 6 years ago

Thanks VereK for your answer,

But I'm not sure where and how to do it. I had been looking into some different CSS-files but without any luck.

I can see on your site in the sidebar that you shift between two different yellow colors. Same as I want on my site in the Recent Post widget, just some other colors.

1 Reply
Sofy
 Sofy
Admin
(@sofy)
Joined: 7 years ago

Support Team
Posts: 4683

@kfj1972

But I'm not sure where and how to do it. I had been looking into some different CSS-files but without any luck.

The CSS code should be added in  Dashboard > Forums > Settings > Styles > "Custom CSS code" textarea. 

In case if the widgets are being loaded on non-forum pages the code should be added in Top admin bar > Customize > Additional CSS textarea.

In any case, please don't forget to delete all caches and press CTRL+F5 on the frontend before checking. 

VereK
Posts: 522
(@verek)
Honorable Member
Joined: 7 years ago

@kfj1972

What Sofy said. Also pro-tip; for consistency look at yoursite/recent which does the alternate colour listing by default, choose the same alt colour from there for your widget styling.