[wp-hackers] get_page_link by page name/slug?
Lee Kelleher
leekelleher at gmail.com
Mon Nov 27 12:15:00 GMT 2006
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/
More information about the wp-hackers
mailing list