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

Menu Underline shows without Hover after adding subitems

.nav-menu .current-menu-ancestor > a {text-decoration:none} will help. Alternatively, use .nav-menu .current-menu-ancestor > a {text-decoration:none !important;}. Please change the .nav-menu with the class name that you have used Please let me know if it works.

Admin Scripts enqueue codes seems ok but not working

Please, try the following code, namespace YOUR_PLUGIN; function backEndAssets() { wp_enqueue_style(‘MYPLUGIN_CSS_URL’, plugin_dir_url(__FILE__) . ‘assets/css/admin-styles.css’); wp_enqueue_script(‘MYPLUGIN_JS_URL’, plugin_dir_url(__FILE__) . ‘assets/js/admin-scripts.js’, array(‘jquery’, ‘media-upload’), ‘1.0.0’, true); } add_action( ‘admin_enqueue_scripts’, __NAMESPACE__ . ‘\backEndAssets’ ); As you are not creating object inside plugin and want to load script then you must define namespace at the begging and define the plugin folder … Read more