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

[Solved] Sticky topic styling

13 Posts
4 Users
5 Reactions
2,153 Views
Posts: 5
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
(@istcwebmaster)
Active Member
Joined: 5 years ago
[#15349]

Is there any way to make sticky topics stand out more? Like change the background colour or something? 

The padlock icon isn't distinct enough so looking for ways to make sticky posts more obvious and visible (they will contain guidelines for the forum users so don't want them to 'not see them').


Topic Tags
12 Replies
1 Reply
Robert
Admin
(@robert)
Joined: 2 months ago

Support Team
Posts: 10716
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

Posted by: @istcwebmaster

Is there any way to make sticky topics stand out more? Like change the background colour or something? 

The padlock icon isn't distinct enough so looking for ways to make sticky posts more obvious and visible (they will contain guidelines for the forum users so don't want them to 'not see them').

New solution started from wpForo 2.2.9 version:

https://wpforo.com/community/how-to-and-troubleshooting-2/sticky-post-styling/paged/2/#post-107093

 


Tutrix
Posts: 1519
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
(@tutrix)
Noble Member
Joined: 6 years ago

@istcwebmaster

you can use jQuery for this

Example for a gray background and an orange border

jQuery( ".wpforo-topic-title i.fa-thumbtack" ).parent().parent().parent().parent().css({ "background-color": "#f5f5f5", "border" : "1px solid #ff9900" } );

paste this code into a .js file of your Wordpress theme

 

by the way padlock icon is not sticky

 

 


Posts: 5
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
(@istcwebmaster)
Active Member
Joined: 5 years ago

@tutrix thanks for this, I'm looking for a CSS solution though. 

Aware the icon itself isn't sticky, I just mean a way to highlight the 'sticky' posts when you look at them in a list on a forum.


7 Replies
Alvina
Moderator
(@alvina)
Joined: 7 years ago

Member
Posts: 1857
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

@istcwebmaster,

Please leave your forum URL to allow us to check and provide some code for you.


(@istcwebmaster)
Joined: 5 years ago

Active Member
Posts: 5
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

@alvina Forums are for members only so require a login to access... it's using the Simple layout if that helps.


Alvina
Moderator
(@alvina)
Joined: 7 years ago

Member
Posts: 1857
Alvina
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

@istcwebmaster,

Please try the following JS code:

jQuery( "i.fa-thumbtack" ).parent().parent().parent().parent().css({ "background": "#cd2653", "border" : "1px solid #FF9900" } );

The red marked value can be changed.


(@istcwebmaster)
Joined: 5 years ago

Active Member
Posts: 5
Alvina
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

@alvina thanks, I don't have the ability to use jQuery I don't think? No place to put JS code that I can see... is there a PHP alternative?


Alvina
Moderator
(@alvina)
Joined: 7 years ago

Member
Posts: 1857
Alvina
Alvina
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

@istcwebmaster,

Here is the good instruction on how to add a js file or js code in the active theme:

https://www.wpbeginner.com/wp-tutorials/how-to-easily-add-javascript-in-wordpress-pages-or-posts/


Tutrix
(@tutrix)
Joined: 6 years ago

Noble Member
Posts: 1519
Alvina
Alvina
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

@istcwebmaster

Which Wordpress theme are you using?


Tutrix
(@tutrix)
Joined: 6 years ago

Noble Member
Posts: 1519
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

@istcwebmaster

unfortunately there is no possibility via CSS

use the code I posted above I also use it, look here

but that only works with sticky Post, not for just closed (padlock icon)


Posts: 5
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
(@istcwebmaster)
Active Member
Joined: 5 years ago

Thank you for all the help, I installed a plugin to allow custom JS, then used the code above and it works!!

Appreciate the patience, I've still got a lot to learn.


1 Reply
Alvina
Moderator
(@alvina)
Joined: 7 years ago

Member
Posts: 1857
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

@istcwebmaster,

Thank you for letting us know.

Glad to hear it worked.


Share: