Support » Plugins » Hacks » Use get_option to retrieve date format

  • Hi there,

    I’m trying to code the date into my header.php tagline – the self-updating kind 🙂 The tagline isn’t a php echo; it’s a get_option — specifically this:

    <div id="container">
    	   <?php $header_caption = get_option('tz_header_caption');
    	    if( !empty( $header_caption ) ) { ?>
    	    <!-- BEGIN #header-top -->
            <div id="header-top">
                <p><?php echo stripslashes($header_caption); ?></p>
            <!-- END #header-top -->'
    
    And in theme-options.php, this is the corresponding code:
    '$options[] = array( 'name' => __('Header Caption', 'framework'),
                        'desc' => __('Enter a message to display above your navigation', 'framework'),
                        'id' => $shortname . '_header_caption',
                        'std' => '',
                        'type' => 'textarea');

    [Please post code & markup between backticks or use the code button. Your posted code may now have been permanently damaged by the forum’s parser.]

    I am certain that I need to adjust the theme-options.php, because initially all I did was to replace ‘tz_header_caption’ in the header.php snippet with ‘date_format’. But all that did was give me a tagline that said m/d/y.

    So, how do I make this work?

    Thank you,

    Amy

Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Use get_option to retrieve date format’ is closed to new replies.