I have a custom plugin in wordpress. In this plugin I am trying to pass an array of values through add_option()
. Like this:
$options = array(
'option1' => $option1,
'option2' => $option2,
'option3' => $option3
);
add_option('options', $options);
Also, at the beginning of the plugin sheet, I include the option.php file:
require_once ABSPATH . '/wp-includes/option.php';
In the page template I try to get the values but I get nothing ( bool(false) ):
var_dump(get_option('options'));
Please tell me what am I doing wrong? Where am I making the mistake? Thanks!