AI Search
Classic Search
 Search Phrase:
 Search Type:
Advanced search options
 Search in Forums:
 Search in date period:

 Sort Search Results by:

Filter by custom fields

Topic prefix

AI Assistant
Notifications
Clear all

[Closed] Editing Recent Post widget

5 Posts
3 Users
3 Reactions
2,133 Views
Posts: 7
Topic starter
Translate
English
Spanish
French
German
Italian
Portuguese
Russian
Chinese
Japanese
Korean
Arabic
Hindi
Dutch
Polish
Turkish
Vietnamese
Thai
Swedish
Danish
Finnish
Norwegian
Czech
Hungarian
Romanian
Greek
Hebrew
Indonesian
Malay
Ukrainian
Bulgarian
Croatian
Slovak
Slovenian
Serbian
Lithuanian
Latvian
Estonian
(@kfj1972)
Active Member
Joined: 8 years ago
[#10687]

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
Translate
English
Spanish
French
German
Italian
Portuguese
Russian
Chinese
Japanese
Korean
Arabic
Hindi
Dutch
Polish
Turkish
Vietnamese
Thai
Swedish
Danish
Finnish
Norwegian
Czech
Hungarian
Romanian
Greek
Hebrew
Indonesian
Malay
Ukrainian
Bulgarian
Croatian
Slovak
Slovenian
Serbian
Lithuanian
Latvian
Estonian
(@verek)
Honorable Member
Joined: 8 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: 7
Topic starter
Translate
English
Spanish
French
German
Italian
Portuguese
Russian
Chinese
Japanese
Korean
Arabic
Hindi
Dutch
Polish
Turkish
Vietnamese
Thai
Swedish
Danish
Finnish
Norwegian
Czech
Hungarian
Romanian
Greek
Hebrew
Indonesian
Malay
Ukrainian
Bulgarian
Croatian
Slovak
Slovenian
Serbian
Lithuanian
Latvian
Estonian
(@kfj1972)
Active Member
Joined: 8 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: 8 years ago

Support Team
Posts: 5774
Translate
English
Spanish
French
German
Italian
Portuguese
Russian
Chinese
Japanese
Korean
Arabic
Hindi
Dutch
Polish
Turkish
Vietnamese
Thai
Swedish
Danish
Finnish
Norwegian
Czech
Hungarian
Romanian
Greek
Hebrew
Indonesian
Malay
Ukrainian
Bulgarian
Croatian
Slovak
Slovenian
Serbian
Lithuanian
Latvian
Estonian

@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
Translate
English
Spanish
French
German
Italian
Portuguese
Russian
Chinese
Japanese
Korean
Arabic
Hindi
Dutch
Polish
Turkish
Vietnamese
Thai
Swedish
Danish
Finnish
Norwegian
Czech
Hungarian
Romanian
Greek
Hebrew
Indonesian
Malay
Ukrainian
Bulgarian
Croatian
Slovak
Slovenian
Serbian
Lithuanian
Latvian
Estonian
(@verek)
Honorable Member
Joined: 8 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. 


Share: