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
Post a Comment