[wp-trac] Re: [WordPress Trac] #6848: is_front_page() and is_home()
erroneously returns true on /blog/page/2 and so forth
WordPress Trac
wp-trac at lists.automattic.com
Sun Apr 27 09:05:39 GMT 2008
#6848: is_front_page() and is_home() erroneously returns true on /blog/page/2 and
so forth
-----------------------------------------------+----------------------------
Reporter: Pinoy.ca | Owner: anonymous
Type: defect | Status: new
Priority: normal | Milestone: 2.5.2
Component: Template | Version: 2.5
Severity: normal | Resolution:
Keywords: is_front_page is_home 2nd-opinion |
-----------------------------------------------+----------------------------
Comment (by Pinoy.ca):
> Get it? Sorry, it's hard to explain, heh.
No I still do not understand. It is no better to exclude pages (now) and
be unclear (now) than it is to determine if it is front of the site, but
paged (proposed) (this is done with {{{is_home() && is_paged()}}}). The
effort is the same, but which is clearer?
There's no need to create our own definition of a widely-used term and
make ourselves a "special case," like this
> '''Front page''', n.
> 1. The first page of a newspaper.
> 2. The starting page, or root page, of a website.
> 3. ''Wordpress.'' The root page of a blog and also its {{{/page/2}}} and
so forth. If you want to refer only to the root page, you have to combine
{{{is_front_page()}}} with {{{!is_paged()}}}, for example, {{{if
(is_front_page() && !is_paged()) echo "Welcome to my blog";}}}.
Would you imagine you're writing a book about WordPress and try explaining
this ....
--
Ticket URL: <http://trac.wordpress.org/ticket/6848#comment:9>
WordPress Trac <http://trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list