I love the new K2 Theme for Wordpress.
I have one major annoyance though. The “pages” that you create in wordpress automatically appear as tabs in the header of the website. I REALLY don’t want them there but there is no way to remove them through the admin interface. I’ve searched around quite a bit and the only solution I’ve found to the problem is to edit the PHP code. I found the offensive code and edited it so the “pages” no longer appear as tabs at the top of my website.
Here is the fix I used to knock out the “pages” from the header.
I am running the “K2 Release Candidate 4″ version.
1. Find the header
“wp-content/themes/k2″
2. Towards the bottom of the file you should find this line of code:
<?php wp_list_pages(’sort_column=menu_order&depth=1&title_li=’); ?>
I have a completely UNMODIFIED version of the theme. This is my first modification. In my header.php file it is on line #137
3. To completely remove the pages from the header all you have to do is comment out the php line by adding two “//” characters right after the beginning of opening php tag. The completed line will look like this:
<?php //wp_list_pages(’sort_column=menu_order&depth=1&title_li=’); ?>
^^ see the change!
4. I could have just deleted the entire line but I always like to leave the original code in case I ever need to refer back to it later.
5. Congratulations! You just deleted your “pages” from the header of your site!
Now, you may still want to display your pages somewhere on your site, I did! Here’s what I did so I could still view my pages as a sidebar module.
1. Log into your wordpress admin account and goto the “K2 Sidebar Manager” under the Presentation tab.
2. Add a new module to one of your sidebars using the “Text, HTML, and PHP” module.
3. Add this code to the module:
<ul>
<li>
<?php wp_list_pages(’title_li=’ ); ?>
</li>
</ul>
4. Viola! You now have your “pages” as a sidebar module!
I decided to kill the tab that either says “Register” or “Site Admin” that appears in the header also.
Basically just follow the steps to remove the “Pages” from the header, except you are going to change this line:
<?php wp_register(’<li class=”admintab”>’,'</li>’); ?>
to this:
<?php //wp_register(’<li class=”admintab”>’,'</li>’); ?>
0 Responses to “K2 Theme for Wordpress.”