Support Forum

spPinnedTopic

ME merkaba5
merkaba5
Member

Hello!

How i can edit design of the pinned topics (background, fonts and etc.)? I didn’t find the relevant classes (e.g. spPinnedTopic) in default.php, in overlays or in .css files of forum themes. 

Thanks in advance for your help.

9 Answers

New Answer

YS Yellow Swordfish
Yellow Swordfish
Member

We actually define quite a few classes in the code that do not necessarily appear in the stylesheets, largely because the majority of users do not want those styles. So – simply define your own styles for these occasions.

#spMainContainer .spPinnedTopic { }

should do the trick.

As always we recommend that you create your own SP theme so that any customisation is not lost during a future update. (http://codex.simple-press.com/codex/themes/theme-basics/creating-a-theme/)

ME merkaba5
merkaba5
Member

After update to 5.3.1 my styles with #spMainContainer .spPinnedTopic not work properly.

Instead of changes only in group view, this styles are applied to group and topic view. How i can apply this style only for gropu view?

YS Yellow Swordfish
Yellow Swordfish
Member

By default the class .spPinnedTopic is ONLY applied to a topic row within the forum view. That is the same with 5.3.1 as it was with previous versions. It is currently used nowhere else. So did you change a template or something to use it elsewhere?

ME merkaba5
merkaba5
Member

I show this problem with screenshots.

Code:

#spMainContainer .spPinnedTopic {
 background: #FFFACD !important;
 font-size: 100%;
}

In group view all right:

 

spPinned_01.jpg

 

But in topic view:

 

spPinned_02.jpg

 

Before update to 5.3.1 topic view with this code was like this:

 

spPinned_03.jpg
YS Yellow Swordfish
Yellow Swordfish
Member

Well apologies. I have no idea why that change was made although I will look back to see. It is probably technically correct to do so though. What you need to really do is be a bit more specific with the CSS rule. Try changing it to this:

#spMainContainer .spForumTopicSection.spPinnedTopic

Note – no space between those class names…

 

ME merkaba5
merkaba5
Member

#spMainContainer .spForumTopicSection.spPinnedTopic

It works! Thank you!

YS Yellow Swordfish
Yellow Swordfish
Member

No problem. Thanks for the confirmation.