How to remove a tabs from questions list

5.10K viewsCore
1

If anybody is trying to remove a tab from question list, then simply follow this:

/**
 * Filter for removing "unsolved" link from question list tab
 * @param  array $nav contain link of tab in array
 * @return array
 */
function my_remove_ap_tab_item($nav){
	unset($nav['unsolved'])
	return $nav;
}
add_filter('ap_questions_tab', 'my_remove_ap_tab_item');

Copy and put this code in your theme

functions.php

Cheers!

Might also be a good idea to list the names for the other tabs 🙂

1

There is a syntax error above. You missed the ; after unset($nav['unsolved'])