I know you can’t offer a ton of support when customizing things. But i went to that site and copied the code into a custom plugin and when I activated, I got this message:
The plugin generated 2 characters of unexpected output during activation. If you notice “headers already sent” messages, problems with syndication feeds or other issues, try deactivating or removing this plugin.
Any tips on this? Is this code for an older plugin version? Did I mess something up? I’ll copy the code I used below here.
<?php
/*
Plugin Name: Ultimate Member - Custom Post Types Extension by JF Web Dev
Plugin URI: https://utlimatemember.com
Description: This adds tabs and content for custom post types to the profiles page
Author: Jim Flannery
Version: 1.0
Author URI: https://www.jfwebdev.com
*/
?>
<?php
/* First we need to extend main profile tabs */
add_filter('um_profile_tabs', 'add_custom_profile_tab', 1000 );
function add_custom_profile_tab( $tabs ) {
$tabs['mycustomtab'] = array(
'name' => 'My custom tab',
'icon' => 'um-faicon-comments',
);
return $tabs;
}
/* Then we just have to add content to that tab using this action */
add_action('um_profile_content_mycustomtab_default', 'um_profile_content_mycustomtab_default');
function um_profile_content_mycustomtab_default( $args ) {
echo 'Hello world!';
}
?>