• I am not able to under stand why double “<<” sign used in header.php file n what this mean.
    code from the header.php is mentioned

    <?php $heading_tag = ( is_home() || is_front_page() ) ? ‘h1’ : ‘div’; ?>
    <<?php echo $heading_tag; ?> id=”site-title”>
    <span>
    ” title=”<?php echo esc_attr( get_bloginfo( ‘name’, ‘display’ ) ); ?>” rel=”home”><?php bloginfo( ‘name’ ); ?>
    </span>
    </<?php echo $heading_tag; ?>>

Viewing 2 replies - 1 through 2 (of 2 total)
  • <<?php echo $heading_tag; ?> id="site-title">

    this is an opening chevron < for a html tag, followed by a opening php tag <?php which adds a dynamic html tag – h1 for the front/home page, or div for any other page, resp.

    when the php code is rendered:

    <?php echo $heading_tag; ?>

    this transforms into:
    on the front page:

    <h1 id="site-title">

    on other pages:

    <div id="site-title">

    ———
    similar with the >> at the end, in here:

    </<?php echo $heading_tag; ?>>

    it is a closing html tag </???> with a php code inside;
    the php part is:

    <?php echo $heading_tag; ?>

    Thread Starter swaraaj

    (@swaraaj)

    @alchymyth: Thnx for ur valuable rply. this solved my problem and understanding.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘header.php’ is closed to new replies.