php - How to make header show only on home page? Wordpress -


Here is the website that I'm editing with WordPress:

www.thestudentbubble.com < / p>

As you can see, there are 3 lines 'headers' stating what the site is all about, how can I just reveal it on the vocal page?

I found the header. The php file and code looks like this:

  & lt ;? php if (get_header_image ()) :? & Gt; & Lt; a href = "& lt ;? php echo esc_url (home_url ('/'));? & gt; & Gt; & Lt; img src = "& lt ;? php header_image ();?>?" class = "header-image" width = "& lt ;? php echo get_custom_header () -> width?; & gt;" Height = "& lt ;? php echo get_custom_header () -> height;; & gt;" Alt = "" / & gt; & Lt; / A & gt; & Lt ;? Php endif; ? & Gt;    

Try it out:

  & lt; php if (is_home ()) {// it is a homepage} else {// is not this homepage}? & Gt;   

The Wordpress function allows you to

    

More information about what is the difference between:

  if (is_front_page ()) & amp; is_home ()) {// default homepage} elseif (is_front_page ()) {// static homepage} otherwise (is_home ()) {// blog page} other {// sabing end}   < / div> 

Comments

Popular posts from this blog

Verilog Error: output or inout port "Q" must be connected to a structural net expression -

jasper reports - How to center align barcode using jasperreports and barcode4j -

c# - ASP.NET MVC - Attaching an entity of type 'MODELNAME' failed because another entity of the same type already has the same primary key value -