Adjust theme headermenu: static pages contact/about/…
-
Hello everybody!
I have downloaded and installed the theme Shade pro from themespinner (https://ericulous.com/2008/09/16/wp-theme-shade-pro/) and seem to have it working. There is just one thing that I do not understand. At the moment, I have a homepage, and I can make new categories. But these new categories do not appear in the headermenu (blue tabs) unless I post a blog into them. And I do not want to.
What I want to do is add a few pages (WP 2.7) to my theme to put contact, about etc. on. These do not need posts on them, but standard content that never changes! When I just try to add a new page, this page only appears in the right menu, and not in the headerbar. So this isn’t my sollution either.
To my knowledge (which is limited) I can not simply add a category or a page to solve my problem being that they do not appear in the headermenu.
Here is the codebit that is in header.php and home.php that should control the headermenu, if I am right:
<?php // Category Sort options global $categories_sort; if(get_settings('Shade_sortcategories')!='') { $categories_sort = 'sort_column='. get_settings('Shade_sortcategories'); } // Exclude Categories options global $categories_to_exclude; if(get_settings('Shade_excludecategories')!='') { $categories_to_exclude = 'exclude='. get_settings('Shade_excludecategories'); } ?> <?php wp_head(); ?> </head> <body> <div id="header"> <div class="header"> <a href="<?php echo get_option('home'); ?>/"><img src="<?php echo get_option('home'); ?>/wp-content/themes/Shade/img/logo.gif" alt="Logo" /></a> <ul> <?php require_once( 'wp-content/plugins/printcatslist.php' ); KFPrintCategories( $categories_to_exclude, false ); ?> </ul> </div> </div>
Pherhaps the problem can be solved in ‘printcatslist.php’, I do not know. I now think that this is only used for coloring active links, but….
This is the code from that document:
<?php /* Plugin Name: Category Highlight Plugin URI: https://www.karlforshaw.co.uk Description: Highlights the category your currently viewing in the top navigation. <b>Note:<b> Only works in (ver: 2.1+) Author: Karl Forshaw Author URI: https://www.karlforshaw.co.uk Modifications: Ryan Maffit Modifier URL: https://www.ryanmaffit.com/ */ function KFPrintCategories( $categories_to_exclude ) { // Check args if (empty( $categories_to_exclude )) { $arg_string = 'orderby=name'; } else { $arg_string = 'orderby=name&exclude=' . $categories_to_exclude; } // Get the category list $categories = get_categories( $arg_string ); // Get the current category global $wp_query; $current_category = $wp_query->get_queried_object_id(); echo "<li".(is_home() ? " class=\"active\"" : "")."><a href=\"".get_bloginfo('siteurl')."\"><span>Home</span></a></li>"; // Echo the output foreach ($categories as $cat) { echo " <li class=\""; if (is_home()) { // Do Nothing } elseif ((! empty( $current_category )) && ($current_category == $cat->term_id)) { echo ' active'; } elseif ( in_category( $cat->term_id ) ) { echo ' active'; } echo "\"> <a title=\"View all posts filed under {$cat->name}\" href=\"" . get_category_link( $cat->term_id ) . "\"><span>{$cat->name}</span></a> </li>"; } // Done.. phew! } ?>
If there is anyone who knows where I should look to fix this problem, and make some categories ‘static’ (appear in the header menu always!), please tell me.
I thought of one thing: uploading new documents called about.php, contact.php etc to the directory where also home.php is, code them exactally like home.php (copy paste the html/php), and then somehow link these pages together to get a lot of ‘home.php’ pages in code, that all have different names. Sounds complex, but I am a real beginner! I wouldn’t know where to start as well.
thanks a lot for helping in advance!
- The topic ‘Adjust theme headermenu: static pages contact/about/…’ is closed to new replies.