wordpress is_home() || is_index() possible?

前端 未结 3 1756
礼貌的吻别
礼貌的吻别 2021-02-06 08:33

I have a test in my header.php to see whether we are at home to display a hero or not.


  
3条回答
  •  一生所求
    2021-02-06 09:35

    Try is_front_page()

    
      
    ...

    That should return true if you are on the absolute root of site.

提交回复
热议问题