WordPress: How to get plugin options from other plugin page
wordpress
Solution
get_option() will always work on WordPress. Make sure you've written the option name well.
You can use a default value(empty array in this case) in case the option is not found:
$options = get_option('my_plugin_options', array() );
Go to your `wp_options` table and check if the value for `my_plugin_options` exists or is set.
Problem
I'm writing a WordPress plugin which has a widget, and that widget displays a link on the page like e.g.: ``` <a href="<?php echo plugins_url('/ext_page.php', __FILE__); ?>">Link</a> ``` Now in the /ext_page.php page, I need to get options from the plugin itself like e.g.: ``` $options = get_option('my_plugin_options'); ``` But the function get_option seems not working in that page, is there any other way to get the options? Please kindly advise, Thanks!