Requesting support

Add a Fixed Support Tab to the Side of Every Page

| 14 Comments

I recently was working with a client who wanted to provide a site-wide link to a support page, where he provided answers to common questions and a contact form to submit a support request.

I proposed adding a fixed tab at the side of the page, which would scroll with the page, so that it’s always visible, no matter page you’re on, or what part of the page you’re looking at.

This of course should be reserved for a single function that is most important to your site. That could be a link to a Donations page, a Support page, a Contact page, or your Store.

Build the graphic

Color options for the support tabFirst, we’re going to build the graphic for the button that will be the actual link.

Since I already built one for my client, I figured I’d just offer you the .psd Photoshop file to get you started.

The button is set up to appear on the left-hand side of the screen (can be rotated 180 degrees for right hand side of screen), has 9 different colors to choose from (can set custom color if needed) and uses the word Support (can be changed to Store, Donate, Contact etc.).

Download the template.PSD format - 180KB

Once you’ve downloaded the template and set it up for your needs, save it as a PNG and upload it to an appropriate place on your server, possibly your theme’s images folder.

Display it on your site

Now that you’ve created the button, you just need to display it on your site.

Start off by opening up your theme’s stylesheet. If you haven’t yet created a child theme, you should do that before editing an original theme.

Paste the following CSS code to the bottom of your stylesheet. Note that you need to edit the background URL to reflect where you uploaded your own image.

#side-tabs a.support {
	background: url('http://www.yourdomain.com/wp-content/themes/yourtheme/images/support-tab.png');
	left: 0px;
	top: 250px;
	height: 108px;
	width: 45px;
	margin: 0;
	padding: 0;
	position: fixed;
	z-index: 9999;
	display:block;
}

You can also change other variables to suit your needs:

  • To move the tab to the right, change the word left, to right.
  • To move the tab up or down the page, change the top value.
  • To use a different size image, edit the width and height values.

Now that everything’s in place, you just need to call upon it, to actually display it. Copy the following code into footer.php, just above the closing body tag:

<div id="side-tabs">
<a class="support" href="http://www.yourdomain.com/support-request/"></a>
</div>

Adding a support tab to WordPressYou need to keep the CSS IDs and classes in line with your CSS, but you should change the href to wherever you want people to be redirected to after clicking on the tab.

Now, with any luck, you’ll have something that looks like this. Of course, you can make it look however you want by creating your own image in Photoshop, instead of using the template.

So, what application did you use this for?

Categories: Resources & News | Permalink

What next?

Hire me

If you couldn't quite manage this yourself, find it too intimidating, or just don't have the time to do it, you can always hire Dave to do it. Please get in touch so that we can discuss your needs.

Leave a comment

If you have a question, update, or comment about the tutorial, please leave a comment. I try and respond to every comment, though it may take a few days, so please check back soon.

Have a WordPress Expert ready to help you

WordPress can do a lot of things and with that comes a steep learning curve. That's why it's nice to have a WordPress expert on hand to help you out when you need it. My service, The WP Butler, gives you the peace of mind that if something goes wrong, I'll be there to help you fix it. Better than that, I'll even keep your site backed up, updated and secure, so that you don't have to worry about it. It's all part of the service. Use coupon DIWW and save 15% on all plans.. Better yet, get a coupon for 25% off by signing up to our newsletter above.

The WP Butler - Your WordPress Expert

Author: Dave Clements

Dave Clements has been building websites for close to a decade and in 2010, he formalised that by starting his own company, The UK Edge. He now works on a variety of web projects, from simple tasks like installing a new WordPress site, to consulting on problems, or redesigning his clients' sites. He also runs Do It With WordPress, a site dedicated to providing free tutorials on WordPress. When he's not building your new website, you can find Dave eating Wheat Thins, spending time with friends and family, watching Indie films, fostering kittens from the local Humane Society, listening to some dubstep, dance and electronic rock, and exploring the world.

14 Comments

  1. Thank you! If you could explain how to create a hover state with this, that would be a nice addition.

    • Hi Kayle,

      Certainly. You can add the ruleset #side-tabs a:hover.support and make whatever changes you need, so if you want to change the background image, you could make it:

      #side-tabs a:hover.support {
      background: url(‘http://www.yourdomain.com/wp-content/themes/yourtheme/images/support-tab-hover.png’);
      }

      Hope that helps

  2. Hey Dave

    Thanks for the code for the fixed tab, Works a treat on my site, I’ve used it for the forum I have just built and I think it looks pretty good.

    Cheers
    Geoff.

  3. Thanks for the help Dave! Used this on a site I designed and it worked beautifully. Great tutorial!

  4. Dave,
    Any tips on how I can show this tab only when a user is logged in? I would like to show it only when a subscriber is logged in.

    Thx.
    Sanjay

  5. Are there any examples of this on a live site?

  6. Thanks for the great tutorial. Is there a way to make the tab refer to an image rather than a section of the website? I’d like to be able to open up a support info image while allowing the user to stay on the same page. Thanks in advance and have a great day!

    • Well, yes, you could, for example, make the hyperlink reference an image (href=”http://……jpg”) and force it to open in a new window (target=”_blank”), thus not closing or navigating away from the current window. Another way would be to have it pop-up in the middle of the screen in a lightbox effect, but that would require some jQuery and I’m not immediately sure how to do that, but a bit of research should quickly yield an answer.

  7. How do you get it to be on the right?

  8. Hi Dave, Is there a way to control the tab on browser resizing? Mine is moving on browser resize….

Leave a Reply