I am currently working on a plugin, and I want to add a settings page. I've already found out how to create the settings page, but how do I get the content from the settings page into a variable so I can use it?
In your options page each field should be put into an options array. For Example:
When you registered your settings page you should have used a code like this:
register_setting( 'pluginPage', 'rt_fed_settings', 'rt_validate');
Once on your page where you want to call settings, use this code:
$options_fed = get_option('rt_fed_settings'); // this is calling your settings array into a variable called options_fed.
Now to call items from it you would call them just like any array items:
The array items were set in your plugins page, but if you want see what is in the code you can use print_r.
Turns out it a lot simpler than I though. When you use
register_setting("something", "name") then to get it in the plugin, just use