Using Wordpress Get_Option on Plugin to Retrieve a Text Value and Display It
The $Options Variable Holds My Wordpress Plugin Options. I've Seen People Print_R but I'm Not Sure How to Just Echo It in a Tag for Instance. $Options =...
The $options variable holds my wordpress plugin options. I've seen people print_r but I'm not sure how to just echo it in a tag for instance.
$options = get_option('simpledir_options', array() );
print_r($options);
This outputs:
Array ( [custom_css_styles] => disable
[custom_css_textarea] => a{color:hotpink;} )
How can I just get the css value of a{color:hotpink;}?
1 Answer
you need to load 'wp-config.php' properly to load 'get_option' function into a page. like:
require_once '../../../wp-config.php';