XF 2.3 Hide threads but not node and counts

kittycaticus

New member
Licensed customer
I would like to set up an Archive section where I will move old, closed threads. I would like the node itself to be visible, and the count with the number of threads it contains, but I do not want the individual threads to be visible to regular members (just to admins/mods). Is this possible?
 
yes, you can use extra.less to add some rules to hide it based on conditions.

use your dev toolkit (f12 in most browsers) to locate the node id, eg:
1784138460895.webp
so if we are trying to hide node 68

and x, y groups are the groups you want to hide it from (not logged in, guests, regular members, etc)

Code:
<xf:if is="in_array({$xf.visitor.user_group_id}, [X, Y]) OR $xf.visitor.isMemberOf([X, Y])">    .node--id68 {        .node-stats-pairs > dt:nth-of-type(1),        .node-stats-pairs > dd:nth-of-type(1),        .node-meta .node-stats-threads {            display: none !important;        }    }</xf:if>
 
Back
Top Bottom