template-functions-links.php:
function get_page_link($id = false) {
global $post, $wp_rewrite;
if (! $id) {
$id = $post->ID;
}
$pagestruct = $wp_rewrite->get_page_permastruct();
if ('' != $pagestruct) {
$link = get_page_uri($id);
$link = str_replace('%pagename%', $link, $pagestruct);
$link = get_settings('siteurl') . "/$link/";
} else {
$link = get_settings('siteurl') . "/?page_id=$id";
}
return apply_filters('page_link', $link, $id);
}
i've replace get_settings('home') with get_settings('siteurl')
But the pages functions does'nt work though.
I'm definately sure, this is a rewrite problem.
If you comment out the following way:
function get_page_link($id = false) {
global $post, $wp_rewrite;
if (! $id) {
$id = $post->ID;
}
$pagestruct = $wp_rewrite->get_page_permastruct();
// if ('' != $pagestruct) {
// $link = get_page_uri($id);
// $link = str_replace('%pagename%', $link, $pagestruct);
// $link = get_settings('siteurl') . "/$link/";
// } else {
$link = get_settings('siteurl') . "/?page_id=$id";
// }
return apply_filters('page_link', $link, $id);
}
it returns the old semantic of page links.
Why did this change?
What does this line mean:
$pagestruct = $wp_rewrite->get_page_permastruct();
Does'nt someone else like to get the pages working??