!!!!! HIILLFFEEE!!!!! list_pages funkt. nicht
Hallo!
Ich weiß die Frage wurde hier schon hundert mal gestellt, ich kriege aber bei mir die Sortierung der Seiten nicht hin. Ich nutze das Nautica 2.2 Template.
Nun habe ich diverse Seiten angelegt und möchte diese sortieren, habe in der Header.php auch [FONT="]'sort_column=menu_order&depth=1&titl e_li=' eingetragen.
Das klappt aber nicht!!!
Hier der Code des Header:[/FONT]
PHP
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<link rel="stylesheet" type="text/css" href="<?php bloginfo('stylesheet_url'); ?>" media="screen" title="andreas01 (screen)" />
<link rel="alternate" type="application/rss+xml" title="RSS 2.0" href="<?php bloginfo('rss2_url'); ?>" />
<link rel="alternate" type="text/xml" title="RSS .92" href="<?php bloginfo('rss_url'); ?>" />
<link rel="alternate" type="application/atom+xml" title="Atom 0.3" href="<?php bloginfo('atom_url'); ?>" />
<link rel="pingback" href="<?php bloginfo('pingback_url'); ?>" />
<title><?php bloginfo('name'); ?><?php wp_title('-'); ?></title>
<?php wp_head(); ?>
</head>
<body>
<div id="wrapper-menu-top">
<div id="menu-top">
<ul>
<?php nautica_list_pages('sort_column=menu_order&depth=1&titl e_li=');?>
</ul>
</div><!--menu-top-->
</div><!--wrapper-menu-top-->
<div id="wrapper-header">
<div id="header">
<div id="wrapper-header2">
<div id="wrapper-header3">
<h1> </h1>
</div>
</div>
</div>
</div>
<div id="wrapper-content">
<div id="wrapper-menu-page">
<?php get_sidebar(); ?>
</div>
<div id="content">
Alles anzeigen
Hier steht ja auch nicht wp_list_pages sondern nautica_list_pages. Hat das dann was mit der Einstellung in der functions.php zu tun.
Hier der Code
PHP
<?php
//this custom function will either display the user name and options, or a login/register link depending on if the user is logged in
function user_login() {
global $user_ID, $user_identity;
get_currentuserinfo();
if (!$user_ID) {
?>
<li><a rel="nofollow" href="<?php echo get_settings('home'); ?>/wp-login.php?redirect_to=<?php print urlencode($_SERVER['SCRIPT_URL']); ?>">Login</a></li>
<li><?php wp_register(); ?></li>
<?php
} else {
print ("Welcome back, $user_identity.");
?>
<li><?php wp_register(); ?></li>
<li><a rel="nofollow" href="<?php echo get_settings('siteurl') . '/wp-login.php?action=logout&redirect_to=' . $_SERVER['REQUEST_URI']; ?>"><?php _e('Logout'); ?></a></li>
<?php
}
}
//this function will list the pages, but add <span> tags in the links, needed for this design.
function nautica_list_pages() {
$output = '';
// Query pages.
$pages = & get_pages($args);
if ( $pages ) {
// Now loop over all pages that were selected
foreach ( $pages as $page ) {
if ($page->post_parent == 0) {
$output = $output . '<li><a href="' . get_page_link($page->ID) . '"><span>' . $page->post_title . '</span></a></li>';
}
}
}
echo $output;
}
// this bit is from Rob Miller's List Subpages plugin
function nautica_list_subpages() {
global $wpdb, $post;
$current_page = $post->ID;
while($current_page) {
$page_query = $wpdb->get_row("SELECT ID, post_title, post_parent FROM $wpdb->posts WHERE ID = '$current_page'");
$current_page = $page_query->post_parent;
}
$parent_id = $page_query->ID;
$parent_title = $page_query->post_title;
// Only display the message if there are actually subpages
if($wpdb->get_results("SELECT * FROM $wpdb->posts WHERE post_parent = '$parent_id'")) {
echo '
<h3>'.$parent_title.' </h3>
<ul>
';
echo wp_list_pages("child_of=$parent_id&depth=$depth&echo=".(!$return)."&title_li=0");
echo '
</ul>
';
}
}
//the custon options for this template
function nautica_options_page() {
echo '
<div class="wrap">
<h2>Nautica 2.2 Options</h2>
<form method="post">
<h3>Page</h3>
<input type="radio" name="pagewidth" id="pliquid" selected /> Liquid<br />
<input type="radio" name="pagewidth" id="pstatic" /> Static, 800px
<h3>Sidebar Align</h3>
<input type="radio" name="sidebaralign" id="sbright" selected /> Right<br />
<input type="radio" name="sidebaralign" id="sbleft" /> Left
<input type="hidden" name="action" value="save" />
<p class="submit"><input name="submit" type="submit" value="Save" /></p>
</form>
</div>'
;
}
function nautica_add_options_page() {
add_theme_page("Nautica 2.2 Options", "Current Theme Options", 'edit_themes', basename(__FILE__), 'nautica_options_page');
}
add_action('admin_menu', 'nautica_add_options_page');
?>
Alles anzeigen
Was muss ich denn hier ändern damit die Sortierung klappt????