[wp-hackers] if it is main page !

Gavin Pearce Gavin.Pearce at 3seven9.com
Wed Aug 18 12:50:22 UTC 2010


Oh OK -  you didn't explain that part. How about something like this?

$paged = get_query_var('paged');
if ( (is_front_page) && ($paged <= 1) )  :
   //page 1 stuff here
endif;

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:39
To: wp-hackers at lists.automattic.com
Subject: Re: [wp-hackers] if it is main page !

No, see
is_home() works great but it will do the same job on others paginated posts.
e.g. ?paged=2 + ?paged=3 and ....
but i want to just display it in ?paged=1
i mean is_home() && the page number that is 1.
i just want to show my text in a page that it's index alone.

thanks

On Wed, Aug 18, 2010 at 5:04 PM, Gavin Pearce <Gavin.Pearce at 3seven9.com>wrote:

> 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
> _______________________________________________
> 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