Gene Steinberg Well-known member Dec 7, 2020 #1 I am using a widget to display the latest posts. But I'd like to remove the Views column. Please advise, step by step, how best to do this.
I am using a widget to display the latest posts. But I'd like to remove the Views column. Please advise, step by step, how best to do this.
P Paul B XenForo moderator Staff member Dec 7, 2020 #2 If it's the latest posts widget on the new posts page and you want to remove the column with replies and views, add this to the extra.less template: HTML: [data-widget-key="whats_new_new_posts"] { .structItem-cell--meta { display: none ; } } If it's a different widget, you can check the widget key in the ACP or via the browser inspector and replace it in the code. Upvote 0 Downvote
If it's the latest posts widget on the new posts page and you want to remove the column with replies and views, add this to the extra.less template: HTML: [data-widget-key="whats_new_new_posts"] { .structItem-cell--meta { display: none ; } } If it's a different widget, you can check the widget key in the ACP or via the browser inspector and replace it in the code.
Gene Steinberg Well-known member Dec 7, 2020 #3 If it's widget_new_posts, I'm not at all sure what we're removing, since there is no reference to views in there (that's all I want to remove). Upvote 0 Downvote
If it's widget_new_posts, I'm not at all sure what we're removing, since there is no reference to views in there (that's all I want to remove).
P Paul B XenForo moderator Staff member Dec 7, 2020 #4 The code I provided does what you asked in the opening post. If you meant something else then you will need to provide more precise information, with links and screenshots. Upvote 0 Downvote
The code I provided does what you asked in the opening post. If you meant something else then you will need to provide more precise information, with links and screenshots.
Gene Steinberg Well-known member Dec 7, 2020 #5 My question is what precisely do I remove from the widget template for new posts? Upvote 0 Downvote
imno007 Well-known member Dec 7, 2020 #6 He's not telling you to remove anything, just to add what he told you to extra.less Upvote 0 Downvote
imno007 Well-known member Dec 7, 2020 #8 Did you substitute the quoted bit with your widget's key name? Upvote 0 Downvote
Gene Steinberg Well-known member Dec 7, 2020 #9 No, because the instructions didn't mention that. I just tried it, but it's not quite what I want. I just wanted to remove the Views column, not the Replies column. That possible using a different set of commands. I've specified just Views several times. Upvote 0 Downvote
No, because the instructions didn't mention that. I just tried it, but it's not quite what I want. I just wanted to remove the Views column, not the Replies column. That possible using a different set of commands. I've specified just Views several times.
imno007 Well-known member Dec 7, 2020 #10 He did mention it in his very first reply to you: If it's a different widget, you can check the widget key in the ACP or via the browser inspector and replace it in the code. Click to expand... Upvote 0 Downvote
He did mention it in his very first reply to you: If it's a different widget, you can check the widget key in the ACP or via the browser inspector and replace it in the code. Click to expand...
Gene Steinberg Well-known member Dec 7, 2020 #11 OK, so what about what I want to do? Upvote 0 Downvote
Jeremy P XenForo developer Staff member Dec 7, 2020 #12 Try (replacing the key as appropriate): Less: [data-widget-key="whats_new_new_posts"] { .structItem-cell--meta dl:last-child { display: none; } } Upvote 0 Downvote
Try (replacing the key as appropriate): Less: [data-widget-key="whats_new_new_posts"] { .structItem-cell--meta dl:last-child { display: none; } }