“Display Site Title and Tagline” checkbox not working?

I’m trying to develop a theme. but “Display Site Title and Tagline” checkbox not working nothing change when i check or uncheck the site tile and tagline still exist. also the color option not giving any effect?
please help my code for the header text is:

<header class="image-bg-fluid-height" id="startchange" style="background-image: url('<?php echo( get_header_image() ); ?>')" >

      <h1 class="h1-hdr"><?php bloginfo('name');?> </h1>
        <br/> <br/>
        <P id="header-pa"><?php bloginfo('description');?> </P>
        <a  class="btn btn-primary btn-lg outline " role="button" href="#" id="btn-header">WATCH A VIDEO</a>
        <br/> <br/> 
    </header>

3 Answers
3

this peace of code will help you

        <?php
            if (display_header_text()==true){
                echo '<h1>'.get_bloginfo( 'name' ) .'</h1>';
                echo '<h2>'.get_bloginfo('description').'</h2>';                            
            } else{
                  //do something
            }
          ?>

Leave a Comment