bdbrown

Replace Site Title With Custom Heading

Dec 9th, 2014
282
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
HTML 2.43 KB | None | 0 0
  1. ----------------------------------------------------------------------------
  2. This is a section of the default header.php file, about 3/4 of the way down:
  3. ----------------------------------------------------------------------------
  4.  
  5.         <div class="container group">
  6.             <div class="container-inner">
  7.                
  8.                 <?php if ( ot_get_option('header-image') == '' ): ?>
  9.                 <div class="group pad">
  10.                     <?php echo alx_site_title(); ?>
  11.                     <?php if ( ot_get_option('site-description') != 'off' ): ?><p class="site-description"><?php bloginfo( 'description' ); ?></p><?php endif; ?>
  12.                 </div>
  13.                 <?php endif; ?>
  14.                 <?php if ( ot_get_option('header-image') ): ?>
  15.                     <a href="<?php echo home_url('/'); ?>" rel="home">
  16.                         <img class="site-image" src="<?php echo ot_get_option('header-image'); ?>" alt="<?php get_bloginfo('name'); ?>">
  17.                     </a>
  18.                 <?php endif; ?>
  19.                
  20.                 <?php if ( has_nav_menu('header') ): ?>
  21.  
  22.  
  23. ----------------------------------------------------------------------------------------------------------
  24. Here is the same section where I've commented out the original code and added a new container and heading:
  25. ----------------------------------------------------------------------------------------------------------
  26.         <div class="container group">
  27.             <div class="container-inner">
  28.                
  29.                 <?php if ( ot_get_option('header-image') == '' ): ?>
  30.                 <div class="group pad">
  31.  
  32.  
  33.                     <!-- BEGIN default site title and description
  34.                     <?php echo alx_site_title(); ?>
  35.                     <?php if ( ot_get_option('site-description') != 'off' ): ?><p class="site-description"><?php bloginfo( 'description' ); ?></p><?php endif; ?>
  36.                     END default site title and description -->
  37.  
  38.  
  39.                     <!-- BEGIN custom heading -->
  40.                         <div class = "myHeading">
  41.                                 <h1>This Is My Heading</h1>
  42.                         </div>
  43.                         <!-- END custom heading -->
  44.  
  45.  
  46.                 </div>
  47.                 <?php endif; ?>
  48.                 <?php if ( ot_get_option('header-image') ): ?>
  49.                     <a href="<?php echo home_url('/'); ?>" rel="home">
  50.                         <img class="site-image" src="<?php echo ot_get_option('header-image'); ?>" alt="<?php get_bloginfo('name'); ?>">
  51.                     </a>
  52.                 <?php endif; ?>
  53.                
  54.                 <?php if ( has_nav_menu('header') ): ?>
  55.  
  56.  
  57. ------------------------------------------------------------------
  58. You could then style the custom heading with something like this:
  59. ------------------------------------------------------------------
  60. .myHeading h1 {
  61.   color: #fff;
  62.   }
Advertisement
Add Comment
Please, Sign In to add comment