Buddypress: adding a new tab direct user to their author page

In your screen function ibenic_budypress_my_posts create a redirect. Something like: function ibenic_buddypress_tab() { bp_core_new_nav_item( array( ‘name’ => __( ‘My Posts’, ‘ibenic’ ), ‘slug’ => ‘my-posts’, ‘position’ => 100, ‘screen_function’ => ‘ibenic_budypress_my_posts’, ‘show_for_displayed_user’ => true, ‘item_css_id’ => ‘ibenic_budypress_my_posts’ ) ); } function ibenic_budypress_my_posts() { $url=”/author/” . bp_get_displayed_user_username(); bp_core_redirect( site_url( $url ) ); }

I enabled debugging but I still get the same message: There has been a critical error on your website

Fatal error handling has been introduced in WordPress 5.1 and 5.2. also known as “Screen Of Death (WSOD) protection.” To exclude this “protection” and restore the old way error catching you should add this to your wp-config.php file since WP_DEBUG true is not enough to disable the WSOD protection : define( ‘WP_DISABLE_FATAL_ERROR_HANDLER’, true );

WordPress plugin blog creation

pluginprefix_setup_post_type() is a method inside the SoaneNews class, not a function, but inside your activate() method you’ve called a function with that name: function activate(){ pluginprefix_setup_post_type(); flush_rewrite_rules(); } To call the pluginprefix_setup_post_type() method from within the class, you need to do it like this: $this->pluginprefix_setup_post_type();