Hey guys, Im hoping i can find somone here to help me with a few problems i am having in getting my settings page up and running??
I am using thesis wordpress theme so i am using custom functions.php
1: When i add this code
function mytheme_option( $option ) {
$options = get_option( 'mytheme_options' );
if ( isset( $options[$option] ) )
return $options[$option];
else
return false;
}
at the top of my custom functions.php i get a white blank page.. im not sure why, if i change the function to “mytheme_options” from “mytheme_option” it seems to work, well my website doesnt crash at least… is the code at the top definately right or am i making a mistake? It is definately this code that is making it crash but i cant work out why?
2: I notice that i havnt added the id code into this section:
$this->settings['example_text'] = array(
'title' => __( 'Example Text Input' ),
'desc' => __( 'This is a description for the text input.' ),
'std' => 'Default value',
'type' => 'text',
'section' => 'general'
);
should i add this manully like
'id' => 'mytextarea1'
How would i add this into a field in my functions.php file, This is the section i want to add the above text area into:
function top_bar() {
?> <div id="#awesome_top_bar_container">
<div class="awesome_top_bar_in">
} ?>
</div></div>
add_action('thesis_hook_before_html','top_bar');
Any advice would be greatly appreciated! sorry for a Newbie questions but i have been struggling with the settings api for so long..
Thanks again
Alex