wp_insert_post() get Fatal Error from Plugin

So If I understand correctly you are creating a custom import plugin to wordpress outside the normal wordpress scope. Therefore you don’t have access to the functions inside .pluggable.php like is_user_logged_in you can redefine them in your plugin or you can just use require_once( ABSPATH . “wp-includes/pluggable.php” ); You will also not be able to … Read more

Creating a custom page & output on a Plugin

You can use the “page_template” filter to load a custom template for a given page. It will replace the template used whenever the “page” template is called. Remember to add the template file somewhere on your plugin folder. add_filter( ‘page_template’, ‘custom_template_function’ ); function custom_template_function( $page_template ) { if ( is_page( ‘my-custom-page-slug’ ) ) { $page_template … Read more