Viewing 7 replies - 1 through 7 (of 7 total)
  • the tabs at the top? I see them, you just need to add more pages which is where I think the tabs come from.

    Thread Starter tahoestyle

    (@tahoestyle)

    yes they show on wp.com but not on my hosted site – I have tried adding pages however the tabs do not reflect my newly created pages

    http://tahoestyle.com/ <– i see 2 tabs. If you dont see them for your newly created pages, thats another issue.

    Hi tahoestyle,

    looks like smallpotato designed the theme for wordpress users with, initially, two tabs in the header: “Home” (displays the blog) and “About” (the page with page ID 2, which is generally the About page).

    Read the “readme.txt” file in the theme folder to see how to change the Header file a little bit to add one or two of your favourite pages in the header tabs as well.

    When the theme was adapted for use at wordpress.com, it was tweaked so that it then contained tabs for each published page on your blog.

    I’m not sure if the php code which was used for achieving that is public?

    I did tweak my wordpress installation to do the same thing – this is very hacky as I am not a web designer, but I’m sharing it here in case its useful for you.

    Step 1 – add some functions
    Add these functions somewhere – I added them in my “Header” file somewhere near the top. There is probably somewhere sensible to add functions, but I don’t know where that is, so within the <header> tags of the “Header” File worked fine for me:

    <?php function string_page_as_list_items($pagenumber) {
    $mypage=get_post($pagenumber);
    $mystringarray[0] =  "<li><a href=\"";
    $mystringarray[1] = get_permalink($pagenumber);
    $mystringarray[2] = "\" title=\"";
    $mystringarray[3] = __($mypage->post_title);
    $mystringarray[4] = "\">";
    $mystringarray[5] = __($mypage->post_title);
    $mystringarray[6] = "</a></li>";
    
    $myanswer = "";
    if (strcmp($mypage->post_status,"publish")==0) {
        $myanswer=implode("",$mystringarray);
    }
    return $myanswer;
    
    } ?>
    
    <?php function string_pages_as_list_items() {
    
    	$set_of_pages = get_all_page_ids();
    	for ($i = 0 ; $i < count($set_of_pages) ; $i += 1) {
       		$pagenum = $set_of_pages[$i];
       	$mystringarray[$i] = string_page_as_list_items($pagenum);
    	} 
    
    	return implode("",$mystringarray);
    } ?>

    Step 2 – Edit the menu part of the Header file

    I then editied the place where the “menu” division is. (Still in the “Header” file) so that it now looks like this:

    <div id="menu">
    		<ul>
    			<li>
    <a href="<?php bloginfo('url'); ?>/"
    title="<?php bloginfo('name'); ?>">
    <?php _e('Home'); ?></a></li>
    <?php echo string_pages_as_list_items() ?>
    		</ul>
    	</div>

    Needless to say, only mess about with these things if you are a) brave b) confident you can change it back if it breaks stuff

    cheers
    Helen

    Easier still you could just use the template tag wp_list_pages

    Yes you could. 🙂

    Hi Jeremy, thankyou for your advice on how to do that more easily,
    Helen

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘digg3 theme / missing tabs’ is closed to new replies.