php - How to remove breadcrumbs if “home” in wordpress static front page -
i found 1 remove breadcrumbs if "home" in wordpress sadly not working me
<body<?php if(! is_home()) echo ' id="homepage"';?>>
in header.php
body#homepage#breadcrumbs {visibility: hidden;}
and added in style.css
first change css this. because breadcrumb trail uses class of breadcrumbs , not id.
body#homepage .breadcrumbs
have tried using is_frontpage()
instead of is_home()
? realize @ moment adding homepage id pages not "home" page? don't use !
in if.
<body<?php if(is_frontpage()) echo ' id="homepage"';?>>
blog postspage = frontpage
on site front page:
- is_front_page() return true
- is_home() return true
- is_front_page() return true
- static page = frontpage
- on page assigned display site front page:
- is_front_page() return true
- is_home() return false
- is_front_page() return true
- on page assigned display blog posts index:
- is_front_page() return false
- is_home() return true
- on page assigned display site front page:
Comments
Post a Comment