Thanks for the reply. I’ve created some custom pages using custom templates. On some of them I have included links that need to go to other pages and also a form submission where the form action is the url of another page. I would like some way of generating the url as shown in my original post. I tried the following but it starting messing up how posts were displayed in WordPress 2.8:
function get_page_url_by_pagename($pagename) {
$p = query_posts("pagename=$pagename");
$p = $p[0];
return $p->guid;
}
Because I need this functionality outside “The Loop”, the_permalink() functions, etc. won’t work for me.
Any thoughts?