WordPress.org

Ready to get started?Download WordPress

Forums

conditional tags and HTML ? (3 posts)

  1. gabriano
    Member
    Posted 4 years ago #

    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>	
    
    }?>
  2. esmi
    Forum Moderator
    Posted 4 years ago #

    <?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 }?>
  3. gabriano
    Member
    Posted 4 years ago #

    thanks alot

Topic Closed

This topic has been closed to new replies.

About this Topic