I am using the Options Framework.
In my theme’s options.php
, I have the following code:
function optionsframework_options() {
$options = array();
$options[] = array(
'name' => __('Footer Navigation', 'options_framework_theme'),
'type' => 'heading');
$options[] = array(
'name' => __('Button 1 URL', 'options_framework_theme'),
'desc' => __('Enter the URL clicking on the button takes you to.', 'options_framework_theme'),
'id' => 'footer-nav1_URL',
'std' => '',
'type' => 'text');
$options[] = array(
'name' => __('Button 1 Text', 'options_framework_theme'),
'desc' => __('Enter the text you see underneath the button.', 'options_framework_theme'),
'id' => 'footer-nav1_text',
'std' => '',
'type' => 'text');
In my theme’s footer.php
, I have the following code:
<?php if (of_get_option('footer-nav1_URL', '') !== '') { ?>
<a href="<?php echo of_get_option('footer-nav1_URL', '');?>">
<span id="icon1" class="index2"></span>
<span class="iconshadow index1"></span>
<span class="name"><?php echo of_get_option('footer-nav1_text', '');?></span>
</a>
<?php
}?>
Those options are not being output in the footer. The footer is working normally otherwise.
Other options called in front-page.php
are working okay though.
Why won’t these options work?
I think the problem is that you are using uppercase letters in the options id:
Try instead:
In general you should avoid using uppercase letters in options names in WordPress.