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