Forums

Hate tabs at top of K2, how can I get traditional sidebar menu (7 posts)

  1. mm232
    Member
    Posted 5 years ago #

    I love K2, and am having fun editing it to suit my needs, however, the theme forces any "About", "Home" or "Archive" sidebar entry for the menu to the top tab menu (hope I'm explaining this properly) I just would like to have those modules/links in the traditional sidebar section of my blog. Any help? I've searched everywhere to no avail.

  2. Samuel B
    moderator
    Posted 5 years ago #

    In header.php look for this code near the bottom:

    <?php wp_list_pages('sort_column=menu_order&depth=1&title_li='); ?>
    			<?php wp_register('<li class="admintab">','</li>'); ?>
    		</ul>

    The wp_register line/call is the "site admin" tab you see when logged in.

    Now if you really want the tabs gone, remove the code or comment it out.

    However, if like me, you just want certain pages listed in the header tabs, then simply modify the code like so:

    <?php wp_list_pages('exclude=2,8,9,10,11,13,15&sort_column=menu_order&depth=1&title_li='); ?>
    			<?php wp_register('<li class="admintab">','</li>'); ?>
    		</ul>

    The excludes are the page id numbers you want excluded. You can have as few or as many as you like.

  3. mm232
    Member
    Posted 5 years ago #

    It worked to remove the tabs from the top, thanks! However the sidebar module in the editor won't allow me to add links like "About" "Archives", etc.. to the sidebar. I can however add other headers. I appreciate the help thus far, is there any way I can add those headers manually?

    Thanks in advance. :)

  4. Samuel B
    moderator
    Posted 5 years ago #

    Hi,
    You can insert the code directly into sidebar.php.

    <?php wp_list_pages('title_li=<h2>Pages</h2>' ); ?>
    You may not need the <h2>.
    You can use the exclude here,also if needed.
    In fact here are all the arguments you can use.
    http://codex.wordpress.org/Template_Tags/wp_list_pages

  5. mm232
    Member
    Posted 5 years ago #

    Thanks again Samboll, it's much appreciated. I've had WP installed for a bit over a month and have been toodling around looking at different themes until today. I'm so excited that I'll finally have my blog finished and can start blogging.

  6. mm232
    Member
    Posted 5 years ago #

    It's not working.. I wonder if it is because of how the code is written for there to be tabs at the top. I did check the wp_list_pages but couldn't find anything that applies. I am good at figuring out problems w/html, and even editing cgi scripts.. but this is a new one for me. I'm going to try and post the code from the sidebar.php so anyone interested can look at it, and perhaps be able to tell me what might work.

    [Moderated (HandySolo): Sorry, that was just too much code so I removed it. In the future, please consider pastebin services such as http://wordpress.pastebin.ca/ or putting the code in a txt file -- either way, just give folks a link to it.]

  7. mm232
    Member
    Posted 5 years ago #

    Just wanted to bump the post up so it doesn't fall off the page. Just need help with this.

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags