[wp-hackers] if it is main page !
Gavin Pearce
Gavin.Pearce at 3seven9.com
Wed Aug 18 12:34:35 UTC 2010
Hi,
No it doesn't, and no you didn't. ;)
From the Codex:
is_home() -
When the main blog page is being displayed. This is the page which is showing the time based blog content of your site, so if you've set a static Page for the Front Page (see below), then this will only be true on the Page which you set as the "Posts page" in Administration > Settings > Reading.
is_front_page()
When it is the front of the site displayed, whether it is posts or a Page. Returns true when the main blog page is being displayed and the 'Settings > Reading ->Front page displays' is set to "Your latest posts", or when 'Settings > Reading ->Front page displays' is set to "A static page" and the "Front Page" value is the current Page being displayed. Note: this tag was added at Version 2.5.
The key bit being "this will only be true on the Page which you set as the "Posts page" in Administration > Settings > Reading."
In simple language - is_home is the main POSTS page (if it isn't the homepage) | is_front_page is the front page / home page.
Like scribu said, for next time: http://codex.wordpress.org/Conditional_Tags
Gav
-----Original Message-----
From: wp-hackers-bounces at lists.automattic.com [mailto:wp-hackers-bounces at lists.automattic.com] On Behalf Of mohammad aghanabi
Sent: 18 August 2010 13:10
To: wp-hackers at lists.automattic.com
Subject: Re: [wp-hackers] if it is main page !
is_front_page() does the same thing as is_home will do.
i read that webpage ENTIRELY.
so another help is needed. :)
thanks for ur reply
On Wed, Aug 18, 2010 at 4:38 PM, scribu <scribu at gmail.com> wrote:
> On Wed, Aug 18, 2010 at 10:58 AM, mohammad aghanabi <m.websoft at gmail.com
> >wrote:
>
> > hi,
> > I'm going to show a particular section of sidebar just in main page,
> > i know there is is_home function but it's not my goal and this will go
> > to show that part in every other pages of wordpress too.
> >
> > i wanna know if there is a function to do such a thing.
> > thanks in advance
> >
>
> is_front_page()
>
> Next time: http://codex.wordpress.org/Conditional_Tags
>
>
> --
> http://scribu.net
> _______________________________________________
> wp-hackers mailing list
> wp-hackers at lists.automattic.com
> http://lists.automattic.com/mailman/listinfo/wp-hackers
>
--
كاش زندگي مثل يك معادله ي خط بود كه هر وقت انسان ها راه خود را گم مي كردند ،
معادله را نشانشان مي داديم
_______________________________________________
wp-hackers mailing list
wp-hackers at lists.automattic.com
http://lists.automattic.com/mailman/listinfo/wp-hackers
More information about the wp-hackers
mailing list