This theme tutorial applies to the following themes:

Fresh News

Customizing Fresh News background

Posted by Magnus Jepson on 18 Sep 08

<br />This tutorial was written by one our awesome forum ninjas - Kirstin Pauk.

Making radical changes to the design of Fresh news can be as simple as editing images, style.css and header.php. It’s important when planning to customize the header, that you decide what elements to keep. All elements except for the logo can be successfully placed elsewhere in your site so you’re not confined to keeping elements the same.

For this tutorial, we’re going to create a site based on holiday experiences, called ‘Wish you were here’.

<br />

As you can see, I decided to remove unwanted elements such as the rss links and categories which can be moved to the sidebar. I also decided to change the category dropdowns to page dropdowns. This tutorial allows you to pick out certain techniques if you don’t want to follow it literally.

Step 1

Make sure that you have the latest versions of wordpress and the Fresh news theme.

Step 2

To create a full width image as your background, use the guide below when designing the image. The width of the image can be any size, but remember to keep the main elements into 960px box in the middle (see the whitened area) and the logo and search box should be in the ‘header image’ section.

<br />

Save your image as bgr.jpg. For the logo, you could either make it a separate image same size as the logo in the fresh news theme or just keep it on the bgr.jpg. You won’t need to use the admin menu for you logo to appear and the area will still be linked to the home page just like the logo.

Step 3

Before we continue, we need to remove any unwanted coding from header.php. You can use either wordpress’ built in editor or a text editor.

Because in this tutorial we’re removing the page and rss links at the top, find and remove this coding:

	<div class="grid_12">
        <ul class="nav1">
            <li <?php if ( is_home() ) { ?> class="current_page_item" <?php } ?>><a href="<?php echo get_option('home'); ?>/">Home</a></li>
            <?php wp_list_pages('sort_column=menu_order&title_li=&depth=1'); ?>
        </ul>
	    <!--/nav1-->
	</div>
	<!-- end .grid_12 -->

	<div class="grid_4">
        <span class="subscribe">Subscribe:   <a href="<?php if ( get_option('woo_feedburner_url') <> "" ) { echo get_option('woo_feedburner_url'); } else { echo get_bloginfo_rss('rss2_url'); } ?>">Posts</a>   |   <a href="<?php bloginfo('comments_rss2_url'); ?>">Comments</a>   |   <a href="http://www.feedburner.com/fb/a/emailverifySubmit?feedId=<?php $feedburner_id = get_option('woo_feedburner_id'); echo $feedburner_id; ?>" target="_blank">Email</a></span>
	</div>
	<!-- end .grid_4 -->

To remove the rss image from the navbar, find this code and remove it:

		<a href="<?php if ( get_option('woo_feedburner_url') <> "" ) { echo get_option('woo_feedburner_url'); } else { echo get_bloginfo_rss('rss2_url'); } ?>"><img src="<?php bloginfo('template_directory'); ?>/images/ico-rss-trans.png" alt="RSS" /></a>
   </div><!--/rss -->

Finally, to change the navbar from categories to pages, find this coding:

	<ul id="nav" class="grid_15">
		<?php include(TEMPLATEPATH . '/includes/version.php'); ?>
		<?php wp_list_categories('title_li=&exclude=' . $ex_aside) ?>
		<li> </li>
	</ul>

and change it to the following:

<ul id="nav" class="grid_15">
			<?php include(TEMPLATEPATH . '/includes/version.php'); ?>
			<?php wp_list_pages('title_li=&exclude=' . $ex_aside) ?>
            <li> </li>
</ul>

You can exclude pages you don’t want in the navbar by changing the text in the brackets to the following:

		<?php wp_list_pages('exclude=17' ); ?>

Once you’ve edited header.php, save and upload (if necessary).

Step 04

Now upload your background image into the default folder (found in /styles/default/). Open up style.css (in the main theme directory) and change the following:

#top{
	clear: both;
	height: ADD IN YOUR TOP MENU HEIGHT;
	margin: 0 auto;
	padding: 7px 0 0 0;
	font-size:11px;
}

#header{
	height: 109px; - make sure you leave this as it!
}

Step 05

To finish you may want to have the image behind the nav menu duplicated in the actual drop downs. To do this, first save a section that can be repeated as nav.jpg, making sure it’s the same height as the header (the width can be anything). Upload into the /images folder (in the main directory).

Now open up default.css (located in the /styles folder) and change #nav command url to nav.jpg:

#nav li ul li { background: #FFFFFF url(../images/nav.jpg) repeat-x top; }

And that’s it!

3 Comments For This Post

  1. Brandon

    Nice tutorial, thanks - I originally used this method for skinning the header on my FreshNews blog, but then I took this one a step further by allowing an infinitely repeating background for the body that’s separate from the header because I noticed that if you want a texture or background graphic to extend infinitely in the vertical direction, you can’t use just the header graphic (unless you want to save a 9999px tall image, and that’s just silly). It’s a bit more advanced in that you need to add/edit a few new s and CSS classes, but if you’re interested seeing the source, check it out in action here: Make Design, Not War

  2. Brandon Jones

    Great tutorial; In case anyone is interested in creating a infinite vertically repeating background for Fresh News, I wrote a rough tutorial inside this post (scroll towards the bottom) that explains how it can be done quickly and easily. You’ll definitely want to follow this one first, but if you understand this tutorial easily and want to try another level of customization, check it out.

  3. Alan Fogelquist

    This is a very useful tutorial. Keep up the good work and hopefully there will be future tutorials of a similar nature on other aspects of these themes.

    Alan F.

Leave a Reply

About WooThemes

WooThemes is a project started by three respected designers - Adii, Magnus Jepson and Mark Forrester - whom all share one thing: their passion for WordPress. All of the themes available on WooThemes are 100% unique and we can assure you that you won’t find similar CMS solutions elsewhere for any other platform.

We pride ourselves not only in the quality of our themes releases, but also that of our support & customer service. Our ultimate aim is to build a community of passionate WooThemes users, where future themes will be influenced by our userbase.

We truly love WordPress and after using any of our themes, you’ll not only love WordPress, but you’ll love WooThemes as well!

Sign up to our newsletter

If you’d like to stay updated with all our latest product offerings and releases, please complete the form below and we’ll send you an e-mail every now and again with all the latest WooThemes news.