Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

I am having trouble with my customize field in WordPress. The field shows up fine in the customize section of WP but it just does not echo out.

<p> <?php echo get_theme_mod('copyright_details'); ?> </p>

functions.php code:

function limus_customize_register( $wp_customize )
{
   //copyright
    $wp_customize->add_section('limus_copyright', array(
        'title' => __('Copyright Details', 'limus'),
        'description' => 'Add/Edit copyright information'
    ));
    $wp_customize->add_setting('copyright_details', array(
        'default' => '&copy; 2000-2013 Limus Design Inc. All Rights Reserved.'
    ));
    $wp_customize->add_control('copyright_details', array(
        'label' => __('Copyright Information', 'limus'),
        'section' => 'limus_copyright',
        'setting' => 'copyright_details'
    ));
}
add_action( 'customize_register', 'limus_customize_register' );
share|improve this question
    
I've run your code seems to work fine. Have you tried enabling debug? –  Mark Davidson Aug 22 '13 at 21:02
    
I have enabled debug from wp-config.php but I see no errors... –  Shivam Aug 22 '13 at 21:16
    
Ah I see what was happening for me it only shows up when your viewing the site via /wp-admin/customize.php –  Mark Davidson Aug 22 '13 at 21:28
    
Yes, I mentioned that in the post. Just the output is not coming out... –  Shivam Aug 22 '13 at 21:35
1  
Have you saved it, know that sounds obvious but the default values are only place holders, won't actually load till you've altered and saved them. Just tried that and seems to be working now –  Mark Davidson Aug 22 '13 at 21:37

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.