/** * Function BX_excluded_pages() * ------------------------------------------------------ * Returns the Blix default pages that are excluded * from the navigation in the sidebar * */ function BX_excluded_pages() { $pages = BX_get_pages(); $exclude = ""; if ($pages) { foreach ($pages as $page) { $page_id = $page->ID; $page_name = $page->post_name; if ($page_name == "archives" || $page_name == "about" || $page_name == "about_short" || $page_name == "contact") { $exclude .= ", " . $page_id; } } $exclude = preg_replace("/^, (.*?)/", "\\1", $exclude); } return $exclude; }
<input type="submit" value="Go!" id="searchbutton" name="searchbutton" /> </fieldset> </form> <ul> <li<?php if (is_home()) { echo " class=\"selected\""; } ?> ><a href="<?php bloginfo('url'); ?> ">Home</a></li> <?php $pages = BX_get_pages(); if ($pages) { foreach ($pages as $page) { $page_id = $page->ID; $page_title = $page->post_title; $page_name = $page->post_name; if ($page_name == "archives") { is_page($page_id) || is_archive() || is_search() || is_single() ? $selected = ' class="selected"' : ($selected = ''); echo "<li" . $selected . "><a href=\"" . get_page_link($page_id) . "\">Archives</a></li>\n"; } elseif ($page_name == "about") { is_page($page_id) ? $selected = ' class="selected"' : ($selected = ''); echo "<li" . $selected . "><a href=\"" . get_page_link($page_id) . "\">About</a></li>\n"; } elseif ($page_name == "contact") { is_page($page_id) ? $selected = ' class="selected"' : ($selected = ''); echo "<li" . $selected . "><a href=\"" . get_page_link($page_id) . "\">Contact</a></li>\n"; } elseif ($page_name == "about_short") {
?> </ul> <?php */ ?> <?php if (is_home()) { ?> <?php /** * If a page called "about_short" has been set up its content will be put here. * In case that a page called "about" has been set up, too, it'll be linked to via 'More'. */ $pages = BX_get_pages('with_content'); if ($pages) { foreach ($pages as $page) { $page_id = $page->ID; $page_title = $page->post_title; $page_name = $page->post_name; $page_content = $page->post_content; if ($page_name == "about") { $more_url = '<a href="' . get_page_link($page_id) . '" class="more">More</a>'; } if ($page_name == "about_short") { $about_title = $page_title; $about_text = BX_remove_p($page_content); } } if ($about_text != "") {