In the header.php of that theme you’ll find a <ul> element which has a bit of PHP that displays the Page links. You can remove this to take it out of your header, and then copy it over to your sidebar.php, or make use of the wp_list_pages() tag:
http://codex.wordpress.org/Template_Tags/wp_list_pages
Thread Starter
Hachi
(@hachi)
Well, I still want to have some up there, but not all of the pages, just the ones that are already up there. Here is the code:
<li<?php if (is_home()) echo ” class=\”selected\””; ?>>“>Home
<?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.”>Archives\n”;
}
elseif($page_name == “about”) {
(is_page($page_id))?$selected = ‘ class=”selected”‘:$selected=”;
echo “<li”.$selected.”>About\n”;
}
elseif ($page_name == “contact”) {
(is_page($page_id))?$selected = ‘ class=”selected”‘:$selected=”;
echo “<li”.$selected.”>Contact\n”;
}
elseif ($page_name == “about_short”) {/*ignore*/}
else {
(is_page($page_id))?$selected = ‘ class=”selected”‘:$selected=”;
echo ”
- $page_title
\n”;
}
}
}
?>
Now, it already has a condition for a page named about_short, to exclude it, but I would like to exclude some more, what kind of coding would I need to do that?
This version of it only displays the home, archives, about and contact Page links:
http://pastebin.com/301226
Note that I’ve just shut off what’s displayed to the if/elseif statements that test the Page name slug. For any Pages you want displayed there, just replace an elseif you don’t require, or insert a new one.
How can you make pages without getting on the navbar or on any menu? just a page.