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

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

9 Posts
3 Users
2 Reactions
1,122 Views
Eli
 Eli
(@eli)
Member Customer
Joined: 7 years ago
Posts: 101
Topic starter  

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
(@astgh)
Illustrious Member Admin
Joined: 7 years ago
Posts: 6193
 

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: 7 years ago
Posts: 101
Topic starter  

@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)
Support
Joined: 5 years ago
Posts: 1403
 

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: 7 years ago
Posts: 101
Topic starter  

@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.

{green}:sweaty:

screenshot
screenshot 1

 

 


   
Elvina
(@elvina)
Support
Joined: 5 years ago
Posts: 1403
 

@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.

 


   
Eli
 Eli
(@eli)
Member Customer
Joined: 7 years ago
Posts: 101
Topic starter  

@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)
Support
Joined: 5 years ago
Posts: 1403
 

@eli,

I've just updated the topic.

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

 

 

 


   
Eli reacted
Eli
 Eli
(@eli)
Member Customer
Joined: 7 years ago
Posts: 101
Topic starter  

@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 reacted
Share:
Scroll to top