Getting error of unexpected output during activation

You have the same username as the plugin author? o.O The error comes from line 444: There’s two characters between ?> and the next <?php Change: add_action( ‘admin_menu’,’business_hours_menu’ ); ?> <?php add_action( ‘widgets_init’, ‘lordlinus_businesshour_load’ ); To: add_action( ‘admin_menu’,’business_hours_menu’ ); add_action( ‘widgets_init’, ‘lordlinus_businesshour_load’ );

Updating Style From WP Options Setting Page

I think you have to solve this with jQuery. If checked -> addClass, if not -> removeClass. Here’s how to enqueue your JS file: add_action(‘admin_menu’, ‘fwds_plugin_settings’); function fwds_plugin_settings() { $hook = add_menu_page( ‘Price Display’, ‘Price Display’, ‘add_users’, ‘fwds_settings’, ‘fwds_display_settings’ ); add_action( “admin_print_scripts-$hook”, ‘fwds_print_scripts’ ); } function fwds_print_scripts() { wp_register_script( ‘my-fx’ , plugin_dir_url( __FILE__ ) . … Read more

Error on using __FILE__ for add_menu_page() Function

Your code should work (not how you expect but it should work), and probably the error was in something that you didn’t post. However… __FILE__ is a constant: you don’t have to use quotes when write it. Remove them like so: add_menu_page(‘Item Display’,’Item Display’,’administrator’, __FILE__, function(){ }); If you use the quotes, ‘__FILE__’ became a … Read more

How to change a specific page to custom page?

I think you want a custom page template. Create a custom page template. In that page template paste your code. Create a “Page” from wp_admin->Pages and select your template file as the “Template” In your page template, you would have something like this: /* Template Name: My Custom HTML Page */ get_header(); get_footer(); Leave out … Read more