• Hi everyone, hope someone could help. I have just started to learn wp.

    I have installed the iTheme 1.1 and have tried to change the home page which was the blog entries. Moved these to a blog page and created a new home page (current home page did not show up in the appearance/pages tab.) Changed the settings/readings to mirror my site, but now I have two home pages.

    I cant seem to find out how to delete the original home, which must have been hardcoded into the theme. I’m unsure how to strip this out so I can control what gets displayed on the home/index page and blog page.

    also, I have noticed I get a rogue
    < ul > appear below the Nav bar as if its a subnav which doesn’t contain any child elements when I create a new page, this shows a grey box under the nav bar. But the blog page with dummy content doesn’t have this?

    could anyone help..

    http://www.twistedjunkie.eclipse.co.uk/images/strange_nav.png

    <div id="header"><br />
          <h1><a>"><?php bloginfo('name'); ?></a></h1><br />
          <div class="description"><?php bloginfo('description'); ?></div><br />
          <?php include (TEMPLATEPATH . '/searchform.php'); ?><br />
        </div><!-- /header --></p>
    <p>    <div id="left-col"><br />
          <div id="nav"></p>
    <ul>
              <li class="page_item <?php if ( is_home() ) { ?>current_page_item<?php } ?>"><a>/" title="Home">Home</a><br />
    		  <?php wp_list_pages('sort_column=menu_order&depth=1&title_li=');?>
            </ul>
    <p>      </div><!-- /nav --></p>
    <p>    <?php /* Menu for subpages of current page (thanks to K2 theme for this code) */<br />
        global $notfound;<br />
        if (is_page() and ($notfound != '1')) {<br />
            $current_page = $post->ID;<br />
            while($current_page) {<br />
                $page_query = $wpdb->get_row("SELECT ID, post_title, post_status, post_parent FROM $wpdb->posts WHERE ID = '$current_page'");<br />
                $current_page = $page_query->post_parent;<br />
            }<br />
            $parent_id = $page_query->ID;<br />
            $parent_title = $page_query->post_title;</p>
    <p>        // if ($wpdb->get_results("SELECT * FROM $wpdb->posts WHERE post_parent = '$parent_id' AND post_status != 'attachment'")) {<br />
            if ($wpdb->get_results("SELECT * FROM $wpdb->posts WHERE post_parent = '$parent_id' AND post_type != 'attachment'")) {<br />
        ?></p>
    <p>    <div id="subnav"></p>
    <ul>
            <?php wp_list_pages('sort_column=menu_order&depth=1&title_li=&child_of='. $parent_id); ?>
          </ul>
    <p>    </div><!-- /sub nav --><br />
        <?php } } ?><br />
Viewing 3 replies - 1 through 3 (of 3 total)
  • so I can control what gets displayed on the home/index page and blog page.

    Have you checked “Settings – Reading”? If A static page (select below) is checked, choose the appropriate pages accordingly.

    as if its a subnav which doesn’t contain any child elements

    If you don’t want this sub menu, just remove the corresponding code, i.e. everything starting with the line containing “Menu for subpages of current page” down to the last line of the snippet.

    Thread Starter lister110

    (@lister110)

    If I comment out this on the header template I end up with a gap below the nav bar. Its funny as the blog page seems fine, though its never going to have a subnav.

    Thread Starter lister110

    (@lister110)

    sorry, I commented out this piece of code and all is fine, as long as I dont need any subnavs:

    <div id="subnav">
    
    <ul>
    <?php wp_list_pages('sort_column=menu_order&depth=1&title_li=&child_of='. $parent_id); ?>
    </ul>
    </div>
Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘itheme 1.1 – static home and blog section problems’ is closed to new replies.