WordPress.org

Support

Support » Themes and Templates » conditional tags and HTML ?

conditional tags and HTML ?

  • i want a specific div to appear on the homepage only so i wrote this and gave me an error so what`s wrong

    <?php if (is_front_page()){
    
    	 <div id="stats">
    	   	   	<p><span class="visitors">Visitors</span>34567</p>
    	   	   	<p><span class="high_rated">Highest rating article</span>Bla bla bla</p>
    	 </div>	
    
    }?>
Viewing 2 replies - 1 through 2 (of 2 total)
  • esmi

    @esmi

    Forum Moderator

    <?php if ( is_front_page() ) {?>
    <div id="stats">
    <p><span class="visitors">Visitors</span>34567</p>
    <p><span class="high_rated">Highest rating article</span>Bla bla bla</p>
    </div>
    <?php }?>

    thanks alot

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘conditional tags and HTML ?’ is closed to new replies.