XF 2.3 How to remove Featured Content from menu

beerForo

Well-known member
I'm not using any Featured Content widgets but I still have this in my menu with 0 results under it. How do I remove it?

1734572731574.webp
 
Solution
Template whats_new_wrapper

Find:
HTML:
    <a class="{$baseClass} {{ $pageSelected == 'featured' ? {$selectedClass} : '' }}" href="{{ link('featured') }}">{{ phrase('featured_content') }}</a>

Replace:
HTML:
    <xf:comment>Remove Featured content tab from What's new</xf:comment>
    <xf:comment><a class="{$baseClass} {{ $pageSelected == 'featured' ? {$selectedClass} : '' }}" href="{{ link('featured') }}">{{ phrase('featured_content') }}</a></xf:comment>

You could alternatively remove the link altogether. However, I place comments in template edits and save the previous code just in case I want to revert without having to go back in the edit history as well as being able to search templates for "comments" to find what I did...
Deactivating it in Navigation removes it from the tab, but not this menu bar. And I am not utilizing this function (widget or otherwise) so it should not be in the menu.
 
Last edited:
I had to do a template edit, it would be nice if it was removed from the moderator menu also. There are a few functions like this that I think should be easier to disable and get rid of any trace of them.
 
Template whats_new_wrapper

Find:
HTML:
    <a class="{$baseClass} {{ $pageSelected == 'featured' ? {$selectedClass} : '' }}" href="{{ link('featured') }}">{{ phrase('featured_content') }}</a>

Replace:
HTML:
    <xf:comment>Remove Featured content tab from What's new</xf:comment>
    <xf:comment><a class="{$baseClass} {{ $pageSelected == 'featured' ? {$selectedClass} : '' }}" href="{{ link('featured') }}">{{ phrase('featured_content') }}</a></xf:comment>

You could alternatively remove the link altogether. However, I place comments in template edits and save the previous code just in case I want to revert without having to go back in the edit history as well as being able to search templates for "comments" to find what I did and when to change something later (a practice that I do, which you don't necessarily have to do).


From this:
1734605714534.webp

To this:
1734605798289.webp
 
Solution
Seems odd. If I deactivate RM or MG the menus reflect that. I suppose they'd have to add functionality to deactivate Featured that goes beyond turning the widgets off. Thanks for the help.
 
Seems odd. If I deactivate RM or MG the menus reflect that. I suppose they'd have to add functionality to deactivate Featured that goes beyond turning the widgets off. Thanks for the help.
That's because you're editing the Public navigation, which is the menu bar only.

It is odd behavior to turn it off there and it still be in the navigation tabs, but again, if you wanted to add a new item to the What's new menu (sub-menu), it wouldn't reflect either.

They're two separate navigation menus. And adding something to the Public navigation→What's new menu would behave much differently as it wouldn't be a tab you could swap between, but a whole new link altogether that would take you off the page.

Perhaps if the defaults are turned off, it should reflect in that template only, and not support adding anything different.

Would have to be a suggestion though.
 
Back
Top Bottom