- WordPress Tutorials
- Artisteer Tips
- Add Button Class to Widget
- Add Style to Text Widget
- Add a Sidebar in the Header
- Create Custom Post Header
- Create Unique Page Template
- Create Secondary Menu
- Create Styled Donate Button
- Create Widget Style – Part 1
- Create Widget Style – Part 2
- Hide Category Titles
- Styling Featured Image
- Styling Sheet Borders
- Using Theme Options
- Design Tips and Tricks
- Recent Projects
Backgrounds, Icons, and Buttons
Well, as you can see if you’ve visited my site before, I’ve just updated the theme again. I like to create new design themes for my own site both for variety as well as to demonstrate some nice Artisteer, Photoshop, and WP tweaking techniques. I’ll list a few of those techniques in this post.
Photoshop:
Designing your own site elements really helps to tie the whole site together completely. By creating your own glare image, buttons, header images, etc. you can give your site a completely customized look without much work. For example, I created the background pattern using Photoshop. All I did was grab a plaid image off of the web (make sure you always only use copyright free images or pay for stock images!) I then, added the green, semitransparent crisscross stripe on a 100px x 100px image of the pattern. I also made sure to define it as a pattern so that I could use it in other elements of the design.
Artisteer:
The beautiful part of Artisteer is that it allows you to easily add your own graphics as texture, backgrounds, glares, etc. I uploaded my 100px x 100px image of the plaid and chose a tile repeat. I also chose the Overlay setting for the blending option in Artisteer and gave it a tiny bit of transparency so that the gradient I chose for the background would still show through nicely.
Artisteer comes with its own texture and pattern designs as well, which are nice to use. The header, button header, and footer are all sporting one of the many built in Artisteer texture graphics.
Artisteer comes with the ability to add your own header background image as well as an object which is perfect for adding your logo image to. However, you may want your image to link to your site’s home page, and you may also want to add some other clickable images to the header (such as social icons, etc.) Below are some instructions on how to do this.
Making Your Logo (or Header Object) a Working Link
1.) Go into your exported theme’s header.php file (or if it’s already live on your site, go to Appearance, Editor, header.php within your Dashboard.)
2.) Find the code for your header object which should look like this:
<div class="header-object"></div>
3.) Add a link to it so that it now looks like this:
<div class="header-object"><a href="desiredurlhere" title="Title here"></a></div>
Adding More Linked Images to your Header
Basically you are going to duplicate the code above as many times as desired changing the class name, the url, and the title to match the items you are trying to add.
1.) Create your images and upload them to your theme’s image folder.
2.) Add appropriate div classes and links to your Header PHP just below the header div. It should look something like this:
<div class="art-Header"> <div class="logo-png"><a href="url" title="Your Title"</a></div>
Again, you’ll need to copy and paste this same code for as many images that you want to add. Just make sure that you label them each based on what they represent, and of course change the display title url to match. You’ll need to use the exact name for the CSS.
3.) Add code to your CSS to display your images in the way that you want. In your theme folder, find style.css, and look for /* begin Header */ Here is an example of the CSS code you should add for the example above (note, make sure to keep the div order the same as it is in the Header PHP):
div.logo-png a
{
position: absolute;
display: block;
z-index:5;
top: 5px;
left: 5px;
width: 500px;
height: 200px;
background-image: url('images/header.png');
}
You’ll need to make the width and height appropriate to your image size, change the position as desired (right now it is positioned 5px from the top left corner of the header), and most importantly make sure that your img url is the name that you saved your image is into your themes image folder.
4.) Always make sure to save the php file before doing any editing in case you make a mistake. You’ll most likely need to tweak the CSS several times in order to position your graphics exactly where you want them.
© 2009 – 2012, Sarah. All rights reserved.





Hi, I stumbled across your website for an article about adding and editing buttons in a WP header and I really like your work. Do you do design work and customization for other people? What are your prices.
God Bless
-Josh
Thank you, Josh. I do offer all types of customized design work including both print design and web design from full CMS WordPress theme design and setup to individual icons or graphics. You can look at my Design Services Page to find out more details, and make sure to contact me personally if you have a specific job request.
Hey I really like the layout of this theme. I have used artisteer to generate a theme I really LOVE over anything I have seen commercial or not. The only thing I can not figure out is how to expand the header and footer like you have done here. I really want to know how to do this. I Would love the layout of this site. I would really REALLY appreciate it if you would share some code with me or give me a little direction as to get me theme to have the charicteristics of this one.
Thanks,
Daine
Thank you, Daine. It really depends on what version of Artisteer you are using to how the code will be altered. If you are using the latest version (V3) the options are already built directly into Artisteer itself. That’s what this theme was actually done in. I was expanding the header and footer while using 2.5 as well, although that required some code alteration. Basically, you need to move the header divs outside of the sheet. So, in your page template.php file you need to scoot the whole section above the sheet divs. Then, in your css, put your margin to 0 auto and change your width to 100%. You’ll need to alter your graphic or background color outside of Artisteer to fit. I usually make a graphic that I can repeat horizontally across the sheet. The same principal applies to the menu and footer. You can find a good article on the Artisteer forum with specific code here.
Thank you Sarah I replied at artisteer to your comments and thank you so much for your advice. I love your design you have here on this site. You have really shown some great graphics skill. It is very artistic and one of the better WP themes I have seen! I am a country recording artist and this layout will really help ALOT with what I want to achieve on my site if I can manage to achieve something similar. Thank you again for finding the time to help me out. Your advice and information will definately get me going in the right direction. Thank you again,
Daine
Excellent Site and article however I cannot the wordpress trick to work. I have in the header.php
and in the style.css
/* begin Header */
div.art-Header-Logo-png
{
position: absolute;
z-index:0;
top: 13px;
left: 5px;
width: 503px;
height: 206px;
background-image: url(‘images/clickforfreelesson.png’);
}
can you tell me where I am going wrong? I used artisteer 3 to make the theme
wierd this part got cut out
that is what I have in the header.php the rest is in the style sheet
the div class you pasted won’t appear because WordPress comments are set up for html, so it is trying to find that class. Don’t worry about it. Where exactly in the header.php file did you put it? Make sure that it’s within the header wrapper just above the logo. Also, give your image a higher z-index as well, as it might be hidden right now behind the jpg.
i put it right after begin header. gave the z-index a huge number and nothing.
sorry, i misread your Q, i put it as you have in the example
Just read through my original post (which was done quite a long time ago.) Here are a few more things to watch out for or change.
1. Make sure that if you copied and pasted from this site that you put it into a text editor such as notepad first. WordPress always switches the direction of quotation marks. So, check those first. In all my newer post I make sure to include that caveat, and I’m starting to upload notepad docs that people can use.
2. You don’t need all of the extra code for making an image clickable anymore. You just need to put just after your div class and before the closing div. (make sure there are no spaces in the <a and </a, as I just included those so this appears in the comments.)
Ok, I just updated this post. Note the change in both the header.php file (a lot simpler code), as well as adding the “a” just after the div title in the css. Again, be sure to check on those quotation marks, too.
Still not working. Here is exactly what I have, notice I replaced all the divs with the word give so it shows up here… I have tried every single combination of things to fix this and cut and pasted to and from a notepad doc
<a href=”http://learnyourenglish.com/?page_id=10”title=”clickforfreelesson”
/* begin Header */
div.art-Header-logo-png a
{
position: absolute;
z-index:20000;
top: 13px;
left: 500px;
width: 200px;
height: 49px;
background-image: url(‘images/clickforfreelesson.png’);
}
Even when you paste into Notepad, you still need to adjust the quotation mark directions. It won’t automatically fix it for you. Also, try to just doing right: 0; to see if it shows up. Then if it does, adjust the spacing from there as necessary. Still couldn’t see the “give” class.
Sorry, it’s still looking for a class so it’s not showing up.
This may be a stupid question, but do you have your image uploaded into your theme’s image folder online? Also, double check the spelling that it is correct.
no not a stupid Q at all it is easy to overlook the simple things but believe me I checked that and even cut and pasted to avoid typos. i even cut and pasted the quotations that were already in the css and php over what I had to make sure they were right. darn i saw that it took it out. what can I change so it does not get stripped out?
I don’t mind taking a look at your actual files. Just email me your login info and url, and I’ll take a look at it.
You should be all set now. Just missing a bracket and your code needed to be scooted just above the logo since you are implementing flash as well. Just hard refresh (Hit F5) your screen to see the changes. Of course, you can change the position of your little button in the css as desired.
Hi Sarah, I’m desperately wanting to add social icons to the header of a new theme i’ve created in Artisteer. I’ve got all the image files ready (the main header, plus 3 buttons); exported the theme as a zip file, gone in and added the images to the right folder.
I’m trying to edit the files directly rather than installing into wordpress and using the editor there, does that change anything?
Then, i’ve opened the header php file from the zip, but there’s no div in it at all. Even for me this is an early crash and burn
Second daft question – if i’ve added the main header background image to the artisteer theme already, do i need to include that in the extra code as well, or is it just one instance of the php and css code per icon i’m adding?
Sorry, i’m really clueless but learning !
When you say there is no div, do you mean there are no div tags for any items? Is there no header jpg or png div classes specified? If so, you are probably using a different version. If you are referring to the div wrapper I suggested using, than you’ll have to add that manually. Let me know which version of Artisteer you are using, and that will help know how to direct you.
Hi Sarah, I’m using the latest full release, 2.6.
The header.php file is pretty short and it’s the first situation – I’m looking for the div class “art header” to add the new code underneath, but it’s not there. Neither can i find any other div tags at all in the file.
many thanks, Kate
If you are using 2.6, you’ll find all of the header divs within the page.php. You’ll just need to also change the code of the one-column.php file as well if you plan to use a single column page template as well.
I’ve just upgraded to artisteer 3 as the full release came out today. I think i’ve edited the header.php ok but haven’t tried putting it live yet as i’m still working on the design in artisteer.
Editing the style css file, i’m confused by what you mean about “most importantly make sure that your img url is the name that you saved your image is into your themes image folder.” – do i need to edit this line: background-image: url(‘images/header.png’); if i’m just adding buttons over a header image I uploaded within the Artisteer theme?
many thanks, Kate
Thanks a lot for this great tutorial
It works for me very well
Glad it works for you.
I am having my website upgraded and would like a nice background image as my current one is just plain white, ( which would fit in with my current theme and logo) do you have any free images? if not could you give me an idea of your prices please?
Thanks
Lisa
P.S Love your current designs
Hi Lisa,
I’m sorry it took a while to respond. I will email you regarding your request.
Hi Sarah, I’m trying to ad a login button to my header. I did the steps that you explained above, but the whole header is clickable and the login.png that I created is nowhere to be seen. I z-indexed the image to 9999.
I have created a and within that div placed the ….
So it looks like this:
<a href="http://myurl/" title="Login"
My CSS:
div.iconav
{
display: block;
position: absolute;
z-index:9999;
height: 41px;
width: 161px;
overflow: hidden;
top: 45px;
right: -300;
}
.logo-png a
{
position: absolute;
z-index:9999;
top: 1px;
left: 1px;
width: 159px;
height: 41px;
background-image: url(‘images/login.png’);
}
I placed my div tag just after art-header(in my case proud-header) in my header.php file.
What I’m I missing? It is currently making the whole header a link.
Sorry, I don’t know why my div example didn’t post correctly.
Here it is again:
Thanks!
|div class=”iconav”||div class=”logo-png”||a href=”http://myurl” title=”Login”||/a||/div||/div|
I replaced < with |
You are missing the px beside your 300 in the css. It should be right: 300px; Hope that helps.
I picked that up. The reason why the whole header was an image is because I left out . But the button still doesn’t want to appear on top of the header image. If I view it with the inspect element I can see the iconav div is in the right place, but there is no image.
I still don’t know what’s wrong….
This is my code in the header:
And my css is:
div.iconav
{
display: block;
position: absolute;
z-index:99999;
height: 41px;
width: 161px;
overflow: hidden;
top: 45px;
right: 600px;
}
.logo-png a
{
position: absolute;
z-index:99999;
top: 0px;
left: 0px;
width: 159px;
height: 41px;
background-image: url(‘images/login.png’);
}
Is there a reason why your width and height are opposite measurements for your div container and your actual image? That might very well be your problem especially since you have the overflow set to hidden. The image might be outside of your container because of your settings, and with the overflow hidden you might not see it at all. That’s just one suggestion as I’m not able to see the php. The other consideration (which I’m sure you’ve already done) is to ensure that your image is labeled identically to what you have in your css and is in the theme’s images folder.
Sarah-
I have been looking for something like this for a while. Thanks! I do have a question though. When I insert the code into my header.php and style.css it causes my menus to drop down below their intended placement. Any reason for this happening or am i doing something wrong?
Since I can’t see your code, I don’t know if there is an error somewhere inside. Adding something within the header shouldn’t affect the placement of your menu at all. Just make sure that the parameters of your new object are not larger than your header itself. That may be causing your issue.
This is my header code:
<html xmlns="http://www.w3.org/1999/xhtml" >
<meta http-equiv="Content-Type" content="; charset=” />
<link rel="stylesheet" href="” type=”text/css” media=”screen” />
<?php if(WP_VERSION
<link rel="alternate" type="application/rss+xml" title="” href=”" />
<link rel="alternate" type="application/atom+xml" title="” href=”" />
<link rel="pingback" href="” />
<script type="text/javascript" src="/script.js”>
<body >
theme_get_option(‘theme_menu_source’),
‘depth’ => theme_get_option(‘theme_menu_depth’),
‘menu’ => ‘primary-menu’,
‘class’ => ‘art-hmenu’
)
);
?>
I am running into another problem when i try to place login/register links as well. It messes with my layout…
Your code does not all appear on the comment form, and it’s malformed because of trying to paste it in. (WordPress strips out most code placed within the comment form.) I’ve removed the comment containing the style sheet as well. I sometimes am able to offer direct assistance for particular coding issues via email, but I’m afraid I’ve got a little too much on my plate right now to offer those services. You may want to check on the Artisteer forums as you can usually find good solutions to common problems there.
One more thing, be sure that you are closing all of your tags properly. That’s usually the cause of most issues with layout. So, all div tags should have a closing div as well. One for the whole wrapper and one for the individual items within a wrapper in the case of social icons, etc.