I just finished a small overhaul of the twentyten theme, using my child theme. Just a few things I wanted changed to start with. So the next articles I write will cover all of that. How to do some real basic customizing. We’ll change the header size, add a background to widgets, widen the theme, etc. But the first thing I did, which is something I always do with my themes is to boot WordPress’ JQuery library in favour of Google’s. Here’s the how and why.
Over the weekend I installed Simple Twitter Connect (STC) and Simple Facebook Connect (SFC) here on VoodooPress. They are my favourite plugins for total integration with each service. And out of the box they work great. You can have them just plop the ‘Like’ and ‘Tweet’ buttons under all your posts, and it works, and looks good. But I’m picky. I really only want my buttons manually placed exactly where I want them. I’m using a twentyten child theme I made, and I wanted to insert the buttons only on single post views. But I didn’t want to copy single.php from twentyten to use my own for just this. I prefer to keep the original templates in use from the parent, and place any extra stuff through functions.php whenever possible. I ran across several options, all of which worked in some fashion. So let’s check out various ways to get content added under your post. You can use the techniques here for pretty much any post, I’m just focusing on a twentyten child as that’s what I’m using.
I needed a contact form for VoodooPress. Normally I use cforms. It’s very powerful, but it seemed like too much for a simple form. I decided to give the Contact Form 7 plugin a try this time. I came across a few challenges getting it set up perfectly with my twentyten child theme. But it was a cool learning experience. Let’s take a look at what I did. A lot of this information may help you on themes besides twentyten as well, it’s just focused on that.
This post has been updated!! Check out the end of the post for newer code.
I’ve seen a few people around the forums looking to add a login link to their navbar. It’s actually really simple to do with a little block of code in functions.php. A lot of people also are looking to have users redirect to the homepage on login, rather than be sent to the dashboard. We can take care of all of that with this block of code.
I have seen quite a few searches come through lately for get_template_part. Seems like a lot of folks don’t know what it’s for, what it does, or how to use it in their WordPress theme. When it was introduced with WordPress version 3.0 I wasn’t all that excited. I didn’t see a need for it. I was kind of set in my ways. I liked how I did things. But after looking into it for a while, I discovered it’s a powerful and useful tool. Let’s take a look at what it does for you.
Take a look down at the bottom of your admin panels. What do you see? There’s some text down there, probably:
What if you would like to replace that? Well, it’s pretty darned easy! Here we go again hooking into WordPress. Just add this to your functions.php or an included file if you followed us here.
Well, next up on my list of WordPress customizations was my custom login logo. And that means it’s time for our next tutorial! This can go into your functions.php, or if you read our previous post it can go into one of your included files. Mine goes into includes/admin-theme.php. It’s another simple hook, check it out.
Continue reading “Custom Login Logo For WordPress Without a Plugin”
In the spirit of posting things as I do them on my site, it’s time to add a favicon. Once again we are going to use your functions.php file. As we talked about in our last article, this is a great way to do this in a child theme. The favicon code normally goes into header.php in the <head> section of your code. And you could do that to your theme, but why bother copying over the whole header.php to your child theme just for this little edit? Just drop this in functions.php and you are all set!
I recently posted an article about the importance of child themes. For now the article is over on my blog, but soon I will move it over here as I get this site going. But since I just started this site, and for the time being have decided to stick with the Twenty Ten theme, I had to take my own advice and make a child theme. I’ve called it Voodoo Child, which is a fun name. I figured as I started doing things to build up the site, I would keep track of little bits and pieces here to help others.