Forum Replies Created

Viewing 1 replies (of 1 total)
  • Thread Starter sticklechick

    (@sticklechick)

    I found a solution by eliminating the Custom Post Type and adding a Theme Options page with a textbox to add/edit the default banner content. Ian Stewart has an awesome, easy tutorial on creating Sample Theme Options. He explains how to make it work with a child theme. (Thanks, Ian!)

    Here is the what ended up going into the header.php file. Hope this helps someone else.

    <div id="headline">
         <?php
              if (is_page()) :
                   $headline_custom = get_post_meta(get_the_ID(), 'banner_headline', true);
                   echo $headline_custom; //Show the custom headline from METABOX
              else :
                   $options = get_option('sanskrit_theme_options');
                   echo $options['headline-default']; //Show the default headline from THEME OPTIONS PAGE
         ?>
         <?php endif; // end check for metabox ?>
    </div> <!-- #headline -->
Viewing 1 replies (of 1 total)