add a.parent in wp_list_pages

According to this thread, you can add a custom Walker class to your wp_list_pages() call. It looks like that’s the way to go, since wp_list_pages() prints or returns a string. If you set $args[‘echo’] to false, you can do some string manipulation before you echo() it, but it seems to me that the Walker solution … Read more

Display all submenus

Ok, the problem in my solution was the use of $menu_item->ID instead of $menu_item->object_id. So the full correct logic is like so: function print_sub_menus() { global $post; // get current page $post_id = $post ? $post->ID : -1; $has_post_parent = $post && $post->post_parent; $top = $has_post_parent ? array_pop( get_post_ancestors($post_id) ) : $post_id; // get all … Read more

only display Pages which have children

Do you want to list only the pages with children? I’m not sure to understand well what you want to do 🙁 If I’m right, you’ll have to do something like this with get_pages() and generate your listing manually after: // First get all pages $pages = get_pages(); // Then, get page IDs if ($pages) … Read more

Non page link in wp_list_pages

I don’t know what you mean by “open a second navigation”. That could mean several things. But to get an “empty” link you have a couple of choices: Option #1– aka, easy but kind-of a hack Add a menu item with the “Custom Links” form. You have to provide an URL but you can delete … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)