Skip to content

Instantly share code, notes, and snippets.

@mahbubme
Created May 14, 2019 04:39
Show Gist options
  • Save mahbubme/1ef8665216b9d82d1b97929fe1e62d83 to your computer and use it in GitHub Desktop.
Save mahbubme/1ef8665216b9d82d1b97929fe1e62d83 to your computer and use it in GitHub Desktop.
Hide posts tab from WPUF account page
<?php
function wpuf_sections_customize($sections){
$posts_tab_index = null;
foreach ($sections as $index => $value) {
if ($value['slug'] == 'posts') {
$posts_tab_index = $index;
}
}
unset($sections[$posts_tab_index]);
return $sections;
}
add_filter('wpuf_account_sections', 'wpuf_sections_customize');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment