Forum Replies Created

Viewing 3 replies - 46 through 48 (of 48 total)
  • Thread Starter dekraan

    (@dekraan)

    Thats ok ?? pherhaps someone else will see it as well. All help or attempts to are very appreciated! My first thought was also that it would be as simple as adding a page, but alass it needs a post to show up in my theme, I think you are right about that!

    Maybe some code will give anyone looking the right idea. This is the headercode that produces the menu, I think. It is on the home.php and header.php page! Maybe the ‘categories to exclude’ has something to do with it. The first part is the logo (i guess), and then something about the printcatslist (unknown to me):

    <?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>

    And in the printcatslist.php it says:

    <?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!
    	}
    
    ?>

    Hopefully this could point someone in the right direction!

    Thread Starter dekraan

    (@dekraan)

    Hello …paul. Can you explain to me how and where it’s done?

    Is it at: theme editor? pages edit? posts edit? for example?

    I can create a page from ‘pages’ and then ‘edit’ or ‘add new’, but these pages only appear in the rightbar under pages. And not in the headermenu. Unless I put a post in it, but I want to avoid doing that ??

    Thread Starter dekraan

    (@dekraan)

    Hi there, thanks for your fast reply!

    It sure is nice looking, and within a beginners-budget as well! I especially like the freshness! My first possible ‘examplesite’ was jandaco.com or coderiser.com, but somehow it seemed a little too… full! www.remarpro.com however has sort of the same layout, but very fresh!

    Do you, or anyone else, know if changing the homepage (index) to something similar as wordpress is going to be hard or easy? (dropping the first post in the blue bit for example and making it an intro…)

Viewing 3 replies - 46 through 48 (of 48 total)