Get Theme Options Not Working
-
So I followed the instructions of a tutorial on how to create theme options and at the part where you need to get the options, the code…
<?php global $options; foreach ($options as $value) { if (stripslashes(get_option( $value['id'] )) === FALSE) { $$value['id'] = $value['std']; } else { $$value['id'] = stripslashes(get_option( $value['id'] )); } } ?>
… is not working, unless I have everything in one file. So if I use header.php or footer.php and have this code in header.php, it will not replace the variables I have in my index file or in the footer. It only works if I call the same code in all 3 templates. Am I doing something wrong?
Viewing 4 replies - 1 through 4 (of 4 total)
Viewing 4 replies - 1 through 4 (of 4 total)
- The topic ‘Get Theme Options Not Working’ is closed to new replies.