Is there a way to h...
 
Notifications
Clear all

[Solved] Is there a way to hide Pinned posts in this layout?  

  RSS

Eli
 Eli
(@eli)
Member Customer
Joined: 2 years ago
Posts: 57
20/03/2020 1:53 am  

Hi there,

We have changed the layout of our forum in a specific way, however since each sub-forum has its own pinned topics they now all show up in the main forum page, is there a way to hide them from there so they only appear inside the sub-forums page themselves?  

We would rather have just the forums and latest posts and replies show up in the main forum page.

You can see our forum page at: https://deepinenespañol.org/comunidad/

Thanks in advance.

screenshot

Astghik
(@astghik)
Support Team Admin
Joined: 2 years ago
Posts: 3831
20/03/2020 12:56 pm  

Hi @eli,

I'm really sorry, but there is no option for this. However, you can do it via the CSS code.

Below is an example of how to hide the first three elements on that page. 

div#post-78 .wpf-thread:first-child, div#post-78 .wpf-thread:nth-child(2), div#post-78 .wpf-thread:nth-child(3){
display: none !important;
}

You can hide the other elements in the same way, just add a new selector and change the value of the nth-child. 


Eli
 Eli
(@eli)
Member Customer
Joined: 2 years ago
Posts: 57
21/03/2020 2:03 am  

@astghik Hi there,

Thanks a lot for your reply, however that code has an adverse side effect, it hides the first 3 posts inside the sub-forums as well.

Also I'm not good at CSS at all, I tried different ways to make more of the pinned topics disappear from the main forum page, but it didn't make any difference, only the first 3 were hidden. You said:

add a new selector and change the value of the nth-child.

Could you please post an example on how to remove the first 10 pinned topics if this is even possible?

Thanks a lot in advance.

 


Elvina
(@elvina)
Prominent Member Moderator
Joined: 7 months ago
Posts: 757
21/03/2020 2:32 pm  

Hi @eli,

Could you please post an example on how to remove the first 10 pinned topics if this is even possible?

Please use the following CSS code to get you want. 

 div#post-78 .wpf-thread:nth-child(4),div#post-78 .wpf-thread:nth-child(5), div#post-78 .wpf-thread:nth-child(6), div#post-78 .wpf-thread:nth-child(7), div#post-78 .wpf-thread:nth-child(8), div#post-78 .wpf-thread:nth-child(9),div#post-78 .wpf-thread:nth-child(10){
display: none !important;
}

Please don't forget to delete all caches and press CTRL+F5(twice) on the frontend before checking.

 

 


Eli
 Eli
(@eli)
Member Customer
Joined: 2 years ago
Posts: 57
21/03/2020 4:27 pm  

@elvina thanks alot for your help, now I understand what @astghik meant by "add a new selector and change the value of the nth-child." I had to also add:

div#post-78 .wpf-thread:nth-child(1), div#post-78 .wpf-thread:nth-child(2), div#post-78 .wpf-thread:nth-child(3),

to the sample code you gave me and it finally works and hides all pinned posts from the forum's main page, however the side effect continues, if you click on any of the sub forums for example: "Repositorios" or "Controladores para PC" the sub forum page appears as there's no posts at all on that sub forum, you can see it in the screenshots below, again thanks so much for your help.

Sweaty

screenshot
screenshot 1

 

 


Elvina
(@elvina)
Prominent Member Moderator
Joined: 7 months ago
Posts: 757
21/03/2020 9:31 pm  

@eli

Please remove all CSS codes provided above and use the following one, delete all caches and check again:

div#post-78 #wpf-cat-6 .wpf-thread:first-child, div#post-78 #wpf-cat-6 .wpf-thread:nth-child(2), div#post-78 #wpf-cat-6 .wpf-thread:nth-child(3), div#post-78 #wpf-cat-6 .wpf-thread:nth-child(4), div#post-78 #wpf-cat-6 .wpf-thread:nth-child(5), div#post-78 #wpf-cat-6 .wpf-thread:nth-child(6), div#post-78 #wpf-cat-6 .wpf-thread:nth-child(7), div#post-78 #wpf-cat-6 .wpf-thread:nth-child(8), div#post-78 #wpf-cat-6 .wpf-thread:nth-child(9), div#post-78 #wpf-cat-6 .wpf-thread:nth-child(10){
display: none !important;
}

Now everithing should work fine.

 

This post was modified 2 weeks ago by Elvina

Eli
 Eli
(@eli)
Member Customer
Joined: 2 years ago
Posts: 57
21/03/2020 10:56 pm  

@elvina Thanks a lot, this works, it is still showing one pinned topic though, I guess that one cannot be hidden or it will probably also hide it from the sub forums pages as well?

 


Elvina
(@elvina)
Prominent Member Moderator
Joined: 7 months ago
Posts: 757
22/03/2020 11:32 pm  

@eli,

I've just updated the topic.

Please try to use the code provided above one more time to get what you want.

 

 

 


Eli liked
Eli
 Eli
(@eli)
Member Customer
Joined: 2 years ago
Posts: 57
23/03/2020 12:01 am  

@elvina It works just fine now, thanks so much for your great help.

It would be awesome if this was added as an option in an upcoming version, being able to hide pinned topics from the forum's main page.

Thank you!

 


Elvina liked
Share: