[wp-trac] [WordPress Trac] #59252: is_front_page returns false when a static blog page has been set.
    WordPress Trac 
    noreply at wordpress.org
       
    Thu Aug 31 10:57:02 UTC 2023
    
    
  
#59252: is_front_page returns false when a static blog page has been set.
--------------------------+------------------------------
 Reporter:  neo2k23       |       Owner:  (none)
     Type:  defect (bug)  |      Status:  new
 Priority:  normal        |   Milestone:  Awaiting Review
Component:  General       |     Version:  trunk
 Severity:  normal        |  Resolution:
 Keywords:                |     Focuses:
--------------------------+------------------------------
Comment (by neo2k23):
 Replying to [comment:1 Marcio Zebedeu]:
 > I think that a post page should not be defined without first defining
 which page will be the home page.
 >
 > However, i believe that we should keep the "post page" option active
 only when the "home page" is chosen.
 Why should i define a static home page if i want to use the none static
 one? Does not make sense.  In that case one should not be able to set a
 static blog page if no static home page has been set.  But there is no
 restriction to that. If i don't have a static homepage i still can define
 a static blog page.
 However in both cases is_home() returns true (which is correct as there is
 no static homepage set) but is_front_page() does only in once case (only
 when no static homepage and no static blog page has been set). To me this
 looks like a inconsistancy.
 is_front_page() should only return true when a static homepage is set or
 in both cases when the static and non static homepage is set. But that
 would make is_home() redundant.
 But looking at the documentation is_front_page() should only return true
 on the static_home_page.
-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/59252#comment:2>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
    
    
More information about the wp-trac
mailing list