Skip to main content
edited tags
Source Link
Shivam
  • 111
  • 1
  • 4

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' );

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' );

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' );
Source Link
Shivam
  • 111
  • 1
  • 4

get_theme_mod(); returns nothing

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' );