Publishers of technology books, eBooks, and videos for creative people

Home > Articles > Design > Voices That Matter

  • Print
  • + Share This
From the author of Enabling the Front End

Enabling the Front End

Now that you've got things working in the Admin, you'll need to add a bit of code (called a theme hook) to your header.php file to display your new options on your live site.

  1. Log into your WordPress Dashboard and choose Appearance > Editor.
  2. In the Templates list on the right side of your screen, click Header.
  3. Before the closing </head> tag, add the following:
  4. <?php
          $content_text_color = get_option('content_text_color');
          $content_bg_color = get_option('content_bg_color');
          $content_link_color = get_option('content_link_color');
          #content { color:  <?php echo $content_text_color; ?>; background:
          <?php echo $content_bg_color; ?>;}
          #content a { color:  <?php echo $content_link_color; ?>;}
  5. Save and close your header.php file.
  • + Share This
  • 🔖 Save To Your Account