[wp-trac] [WordPress Trac] #18705: home_url() and is_home() with a static front page
WordPress Trac
wp-trac at lists.automattic.com
Fri Aug 17 19:20:05 UTC 2012
#18705: home_url() and is_home() with a static front page
-------------------------+------------------------------
Reporter: crrobi01 | Owner:
Type: enhancement | Status: new
Priority: normal | Milestone: Awaiting Review
Component: General | Version:
Severity: normal | Resolution:
Keywords: |
-------------------------+------------------------------
Comment (by grantnorwood):
+1 for updating the language of is_home() to better reflect the blog index
page, but it seems to me that a function called is_posts_page() would make
more sense if it returned true when the current page were *any* of the
blog-related pages (archive, author, cat/tag, date, etc), not just the
index page.
Better names for the blog index page (currently is_home()) might be
is_blog_home(), or is_posts_home(), which makes it more clear that it is
the "home" page for the blog posts.
Also, that would allow a new is_blog_page() function to be created to
conditionally check if *any* of the post-related pages are currently being
viewed, which is handy when you want to apply templates/styles to more
than just the is_home() page.
Please see my ticket #21620 for adding a new function which checks for any
of the blog-related pages, regardless of the naming or implementation of
the existing is_home() function. I've already attached a patch that I
hope is helpful to all.
--
Ticket URL: <http://core.trac.wordpress.org/ticket/18705#comment:8>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list