Have you tried to go to “Manage” -> “Files” and change the header or other tamplates? (Your page source told me that you have WP 2.0)
I am interested in finding a solution for this problem, too and I think there is no other way but to edit the function wp_list_pages() in template-functions-post.php (one could check for the $page->ID and if it is the desired one, echo a link to the external page).
Has anyone a better idea…?!
Thread Starter
Harvey
(@harvey)
mnipert, could you let me know how to technically implement the solution you suggested? I would like to give it a shot.
You have to edit the function “_page_level_out()” in the file “template-functions-post.php”. Goto line 416 and change the line
$output .= $indent . '<li class="' . $css_class . '"><a href="' . get_page_link($page_id) . '" title="' . wp_specialchars($title) . '">' . $title . '</a>';
to
if ($page_id == $ext_entry_id) {
$output .= $indent . '<li class="' . $css_class . '"><a href="' . 'HERE_YOUR_URL!!!' . '" title="' . wp_specialchars($title) . '">' . $title . '</a>';
}
else {
$output .= $indent . '<li class="' . $css_class . '"><a href="' . get_page_link($page_id) . '" title="' . wp_specialchars($title) . '">' . $title . '</a>';
}
In your MySQL-DB in the table “wp_posts” you can look up the entry ID for the page you want to link to another URI. In the code fragment above “$ext_entry_id” must have this value (you can also use multiple “if-else” or even a “case” for more non-standard URIs). Now, change “!!!HERE YOUR URI!!!” to the desired URL.
Hope that helps and I hope there’s not something more elegant out there… (because this is quite unelegant).
Mathias
Isn’t that an overkill (I mean modifying core files!) just to get a link?
You just need to add another list item to it. A detailed elegant solution by Kaf:
http://wordpress.org/support/topic/33102?replies=28#post-188424
Isn’t that an overkill (I mean modifying core files!) just to get a link?
Yes, probably, as I noted earlier. If Kaf’s solution is better, more elegant, and works with 2.0 then, of course, everyone should use it. I haven’t heard from the static-link plugin – thanks.
Thread Starter
Harvey
(@harvey)
Got a tip from a friend on how to solve the same. But it involves editing core files the same…
You can’t “configure” that….you need to modify the php code…..
Look for the template-functions-links.php file in wp-includes…
Modify and add in the following code ….
Check the page id of your BBS from your admin page and modify the parameter accordingly…
Good luck dude !
if ( '' != $pagestruct ) {
$link = get_page_uri($id);
$link = str_replace('%pagename%', $link, $pagestruct);
$link = get_settings('home') . "/$link/";
} else {
if ( $id == "2" ) {
$link = "http://www.top1asia.com";
} else {
$link = get_settings('home') . "/?page_id=$id";
}
}