In template, get name of multisite?
-
I can probably get away just taking the URL and cutting it down to parts. But is there a WP function to get the multisite ID or name?
Also, I’ve made my own menu to fit my self made theme:
if(function_exists("wp_pages_nav")) { print_r(get_children()); if($post->ancestors[count($post->ancestors)-1]) { $child_of = $post->ancestors[count($post->ancestors)-1]; } else { $child_of = get_the_ID(); } if(is_home() OR get_the_ID() == 2) { //2 = SMC:s huvudmeny $menu = wp_list_pages("echo=0&child_of=2"); } else { $menu = wp_list_pages("echo=0&child_of=".$child_of.""); } $menu = str_replace('<li class="pagenav">Pages<ul>', '', $menu); $menu = substr($menu,0,-3); print $menu; }
Problem I have is that when under a multisite, the “wp_pages_nav” function doesn’t seem to understand what pages to list? I’ve tried adding “child_of” manually and picking an ID, but since it’s a multisite, I have no proper “parent” ID for the menu function.
What should I do?
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘In template, get name of multisite?’ is closed to new replies.