Highlight WordPress Category when on a Single Post: Tutorial

While making the redesign for this blog I wanted to highlight the category in the navigation when browsing the specified category as well as keeping it highlighted when on the a single post added to that category ( you’ll notice that the navigation is highlighted if your on this page ).

I searched high and low and eventually found a simple plug-in, by adding a small piece of code to the plug-in I could achieve this, follow the steps below and you should beable to get your categories highlighted too when on a single post.

What we want to Achieve:

Add a Home page link to the navigation and highlight current page.

Highlight the current category

Highlight the current category even when on single post

Step 1: Download The Plug-in

Download the plug-in: Here (zip) From: Screenshine

Step 2: Uploading and Editing the Plug-in

1. Upload the plug-in to your WordPress plug-ins folder.

2. Go to your WordPress admin panel “Plugins” and “Activate” the plug-in

3. Look at your “Currently Active plugins” and click “Edit” for the “Show Active Category plugin”

4. Scroll down past the copyright information until you find this line of code

[php]
if( is_single()) {
[/php]

change that line of code to look like this

[php]
if( is_single() || is_category() ) {
[/php]

Click “Update file” to save the changes

Step 3: CSS for Highlighting Current Category

Go to your theme CSS file normally called “style.css” and add this line of code below.

[css]
.active_category{background-color:#66FF00;}
[/css]

NOTE: you can style this how you want it will style the current category and the category when on a single post using the plug-in.

Step 4: CSS for Highlighting Current Page

To highlight your “pages” all you have to do is add this line of code to your CSS file, This css class is actually built in to WordPress

[css]
.current_page_item{background-color:#66FF00;}
[/css]

NOTE: you can style this how you want it will style the current page

Step 5: Add a Home Page Link

You can have a home page link in your navigation take a look at what i have, This hard codes a “Home” link in to your navigation and adds the class “current_page_item” when on your index page, this is styled with css as in Step 4

[php]
<div id="nav">
<ul>
<li <?php if (is_home()){echo ‘class="current_page_item"’;}?>><a href="<?php bloginfo(‘url’); ?>/">Home</a></li>
</ul>
</div>
[/php]

All Code For The Navigation

So this is a summary of what we’ve done, if you’ve uploaded the plug-in, activated it and edited the code, you can test the code below, copy and paste

Put this in your style.css

[css]
.active_category{background-color:#66FF00;}
.current_page_item{background-color:#66FF00;}
[/css]

Put this in your header.php

[php]
<div id="nav">
<ul>
<li <?php if (is_home()){echo ‘class="current_page_item"’;}?>><a href="<?php bloginfo(‘url’); ?>/">Home</a></li>
<p><?php wp_list_pages(‘title_li=’); ?><?php wp_list_cats(‘sort_column=name’); ?>
</ul>
</div>
[/php]

All this code adds the home page link, all your pages and then all your categories to your navigation, if you’ve added the CSS styles to you Style sheet these things should be highlighted when on the current page, category and single category post.

Questions

So hopefully you’ll find this useful, let me know if you get it working or get stuck in the comments below ill try my best to help you but obviously i cant help you with the plug-in as I did not make it.

Tips on Pre-flight before sending to the printers

Arron Lock has kindly agreed to write some articles for design shard, you can check out his web site and follow him on Twitter

He’s compiled some tips that should be taken in to consideration before presenting your files to the printer for printing. Expect to see more posts from him in the coming weeks as well as other authors.

Define Page Size and/or Bleeds correctly

Page elements that bleed should extend 1/8″ past the page boundary. The page dimensions should be exactly the same as your final trim size of the piece. DO NOT build your page elements in the middle of a bigger page and manually add crop or registration marks. They will probably get printed and your piece will suck.

Provide bitmap images at adequate minimum resolution

NEVER, EVER, EVER use image you copied from a website in your print job. Not only will this violate some copyright laws, it will also render a very ugly result. Web images are almost always 72dpi. You want to use images that are at least 300dpi.

Provide import source files

If you are using an image editing program like Photoshop, you may want to include the layered PSD file so that if any minor adjustments could be made by the printer. THIS IS NOT AN EXCUSE FOR THINGS TO BE INCORRECT TO BEGIN WITH.

Supply image files in CMYK mode

Things are printed in CMYK. Things on screen are viewed in RGB. It is much easier to work on files in an RGB profile as it allows for the most flexibility in image editing. However, make sure you flatten and convert these files to CMYK before they are used in the final work. If sent to press while still in RGB mode, chances are good that the printing software will kick up all sorts of errors.

Define spot and/or process colors correctly

Speaking of colors, it is a good idea to define all spot and process colors so the printer has either a PMS number or a CMYK formula to use. You should really be doing this any way to keep everything consistent.

Provide proofs

You should always provide a proof to the printer so they know what the job should look like when it’s finished. I like to use a PDF because they are pretty much universally utilized.

Include all imports…ALL imports

This is one of the most critical steps that some, ahem, “designers” forget about. Anytime you use an image, logo or graphic in a file to be printed it isn’t actually copying that image. It is linking it to the original files location.

So if you don’t include these with your packaged file set when it goes to the printer guess what, you aren’t gonna have any of those linked images in the final work. Lucky for you most current page layout software like Adobe InDesign, Quark and Pagemaker (do people still use Pagemaker?) can do this for you by running a “Preflight” or “Package” command.

Include all fonts…ALL fonts

Sending all the fonts used in a job is VERY important. If you use a font that your printer doesn’t have then one of two things will happen.

  1. Your job will be printed with the closest match the software can find
    (if you are using a reputable printer this should really never be the case)
  2. The printer will contact you to get the appropriate font from you.

Communicate with your printer

Talk to the people who will be handling your job. Let them know exactly what you want to accomplish with your printed work and they will be able to guide you in making sure everything is correct.

Some definitions:

CMYK: Cyan, Magenta, Yellow and Key (Black), the four process color inks. These are the inks used to print full color images.

Bleed: When an image or printed color extends beyond the trimmed edge of a page. Bleeding ensures that the print extends to the edges of the paper. The paper is usually trimmed to the desired size after printing.

Spot Color: An ink formula resulting in a specific color. Each spot color will need its own film/plate. Referred to as PMS (Pantone) colors sometimes.

Process Color: One of the 4 colors in CMYK – Cyan, Magenta, Yellow and Black

Proof: A rendering of what the final printed result will look like.

Design Shards October 2008 Calendar On Smashing Magazine

While making my re-design for my site I was also working on an entry for smashing magazines October calendars, luckily it made the cut and was featured on the list this month.

October Can Be Beautiful Too

If you want a specific resolution feel free to leave a comment stating what you want and id be glad to upload it for you, or you could resize the bigger resolution.

I have a big interest in illustration so i picked up my £35 graphics tablet and got to work on creating a face, I am very pleased with how it turned out and could stare at her eyes all day.

The wooden background is a texture that i included in my texture pack that I released a few months ago, also I added extra overlays to the illustration with other textures that I included in the pack to make it more rustic and give it a feel of nature and autumn.

I created the calendar from a piece of cardboard and downloaded a leaf stock image pack from deviant art, added it all together and that was the result feel free to download the calendar, if you have no use for it maybe you could get some inspiration from it, either way hope you like it.

You’ll notice the wide open space on the left of the calendar, I realise some people don’t have Icons on there desktop but I do so I am sorry if this annoys you or if your using vista that the calendar gets covered up by your widget.

Media Slap Free Photoshop Brushes Download

Media Slap sent me an email to giveaway some of there finest brushes, I ve compiled some pictures of the brushes that are included in the download. Don’t know if they’re exclusive to us, but feel free to download them.

Download The Brushes

  1. Free From Media Slap: Download (12mb)
  2. Visit Media Slap : Media Slap

About The Brushes

The first is 19 brushes from 18 sets on media slap and the 2nd is 20 border brushes from the entire ‘Bangin Borders’ set.

The pictures don’t do these brushes justice as they are at HI-RES 2500px / 2500px this means you can use them, for bigger projects that you have or scale them down to fit better.

I personally like the grungy style border brushes that are included in this pack.

Samples of the brushes

These Brushes are infact HI-RES 2500px / 2500px

About Media Slap

Departika is pleased to announce the launch of Mediaslap, a new online resource that sells Photoshop brushes created by the Mediaslap team and hand-selected artists from around the world. The new website provides Photoshop brushes of the highest standard to designers, scrap bookers, photographers, design agencies, and do-it-yourselfers.

The initial version of the site includes a limited selection of products and a variety of licensing options available for download. Mediaslap is accepting product submissions from artists and is providing accepted contributors a 60% share in the revenue.

Based on user and contributor feedback, Mediaslap will expand quickly in the coming months to include additional products and tools that provide added value for the contributing artists and designers. Mediaslap aims to become the best resource possible for selling, finding, and licensing Photoshop brushes. For more information on partnerships and artist opportunities with Mediaslap, visit Media Slap

Tips for Working in CMYK for Print – Computer Arts

I started reading computer arts magazine and i noticed they had an article that they interview Ed Templeton from Red Design, I immediately thought that i should share this interview from the magazine as I thought it could benefit others and get some quick tips about print design.

Print design isn’t talked about enough in the web design community and id like to learn more about it as I’m from an intense web based background and hopefully others do too, this should be a nice start to a series of posts about print design in the coming weeks if you’d like to contribute a post feel free to contact me.

The Interview from Computer Arts magazine

    Make a plan

    At an early stage, decide what paper stock you’re printing on and what finish will be applied: matt, gloss, varnish, laminate and so on. Are there any benefits or limitations to your choice of paper and finish that you should bear in mind while designing.

    Talk to your printer

    Describe your project to your printer to get their grids or agree delivery requirements early on. A good printer will advise you of any potential problems with your design or stock choices – and may offer alternatives.

    The Right Tools

    Use the right software for the job. Just because you know Photoshop doesn’t mean you should design a magazine in it! Create and amend images in pixel-based programs such as Photoshop; make illustrations and so on in vector based programs; and compile and lay out for print in programs such as InDesign.

    Understand CMYK

    The coloured inks Cyan, Magenta, Yellow and Key (or Black) are laid down in that order, Black being last and acting as ‘Key’ that locks the image together. Once you understand the process you can use it in creative ways such as overprinting blocks of C, M or Y or creating a ‘rich black’ of K plus some C, M and Y.

    Get colour reference

    Using colours swatches at the design stage such as ‘Pantone Solid to Process’ or ‘4-Colour Process Guide’ is invaluable. Most monitors aren’t perfectly print-calibrated, so colours on screen wont look the same in print – check the coated and uncoated swatches to get a better idea.

    Working in RGB

    When using images its much easier to manipulate an retouch them in RGB mode in Photoshop, When you’re done, flatten the image and convert to CMYK before placing it in your layout software.

    Don’t fake fonts

    Use only the actual fonts for bold, italic, and other styles when having a document printed commercially. If you’ve used the software fake italic, it’s possible that the text won’t show up as italic when printed. Besides the real font has been designed for the purpose better.

    Bleed and Slug

    The bleed and slug areas are trimmed away at the documents final size. The former is the area beyond the trim line for images or other elements that you want to ‘bleed’ off the edge of he page. The latter is an area where you can put non-printing information, such as project details.

    Do a pre-flight

    This is a final quality check that you can perform to make sure the printer is getting all the files, fonts and images in the right formats. It used to be a manual process, but these days most layout programs will do it automatically, so there’s no excuse.

    Proof for perfection

    Ideally, your printer will provide a proof you sign off before the job goes ahead. If that’s not possible you can run some checks on your print-ready PDF. Using Acrobat to preview separations, ink coverage, transparency and overprinting.

Interview Summary

  • know what paper your going to use or want and notify your printer.
  • Get advise from your printer, for recommendations on your project that you want printing
  • Try to use the right tools for creating print documents such as Adobe InDesign
  • Use the actual font that is supplied so if its not italic don’t make it italic in the program such as Photoshop
  • Make sure your content is inside the bleed and slug
  • Do a pre flight to see if there are any problems with your work.
  • Test your document that you have had printed for quality.

More Information

here are a few more things to consider when deciding on your paper choice for print and what effect it will have.

  1. Opacity of the paper: in reference to how much you can see through the paper e.g. A magazines pages will want less opacity otherwise the reader maybe put off by the text showing through the paper.
  2. Thickness of the paper: The right thickness of paper should be used as thick paper costs more and can make documents look thicker than they actually are such as books, and e.g. Business cards use thick paper / card.
  3. Brightness: If the paper is coated in varnish a lot of light will be reflected from the paper, if the paper is too bright this can prevent who ever is reading the page from seeing certain parts. e.g. magazine covers.
  4. Strength of the paper: paper bags, or shoe boxes have a particular need to be durable and strong due to the amount of weight that will be put on them, where as other things such as magazine pages don’t need to be.

Useful Links about Print

  1. Crops and Bleeds – Setting up print bleeds in Photoshop, Illustrator and Indesign
  2. Colour Code Chart – Colour Codes Matching Chart HTML (Convert CMYK, RGB Hex)
  3. Megapixels – Pixel resolution and print sizes
  4. CYMK – Every thing about CMYK
  5. Print Designers – An intresting look in to print design
  6. Colour Theory 101 – Increasing and decreasing the amount of colour CMYK and RGB

This is just an introduction

Hopefully this post can get you thinking more about printing work to quality standards and preperation, this is just an introduction to a series of posts dedicated to print design and how to go about doing it the right way.