[wp-hackers] get_page_link by page name/slug?

Robin Adrianse shorty114 at shorty114.net
Mon Nov 27 16:41:23 GMT 2006


I don't think there is a function that does this that is in the core. If you
want, feel free to submit it to Trac (trac.wordpress.org).

On 11/27/06, Lee Kelleher <leekelleher at gmail.com> wrote:
>
> Yeah, Robin is right... I'm using it in the header/footer of my template
> (outside of the loop).
>
> Essentially I wanted a way to link to a page (not a post) regardless of
> the
> permalink structure - but using the slug/name as the reference.
>
> My code works fine, but was more curious if there was a more native way
> using the WP-core code?
>
> Regards,
> - Lee
>
> From: "Robin Adrianse" <shorty114 at shorty114.net>
> > To: wp-hackers at lists.automattic.com
> > Date: Sun, 26 Nov 2006 12:33:57 -0800
> > Subject: Re: [wp-hackers] get_page_link by page name/slug?
> > No, I think he's using it not in the loop for the page in question. For
> a
> > navigation, eg.
> >
> > On 11/26/06, Michael B <miklb.online at gmail.com> wrote:
> > >
> > > Forgive me if I misunderstand, but is the_permalink exactly what you
> > want?
> > > http://codex.wordpress.org/Template_Tags/the_permalink
> > >
> > > <a href="<?php the_permalink(); ?>"><?php the_title(); ?></a>
> > >
> > >
> > > ~miklb
> > >
> >
>
> --
> Lee Kelleher
> http://leekelleher.com/
> _______________________________________________
> 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