Ready to give up
I got it installed, and wanted to use it to post comments on a regular website, not just a blog…but I am thinking it is too confusing. I have been designing websites for over ten years, and I created a new design for this site, but I am freaking clueless as to how to implement it with word press. It seems like everything is all broken up into a hundred different pieces, and looking at the tutorials so far is not helping either. Can someone just for starters tell me how to put my OWN header image in there, and maybe I can begin to get a clue, otherwise, I am starting to thinking writing my own code is faster.
Your header image would go into the header.php file. It gets less confusing the more you work with it, but basically your header and footer are always the same and they come from the header.php and footer.php files. Then the content is loaded in single.php (if it’s a post) or page.php (if it’s a page). The index.php just pulls all the pieces together so you shouldn’t really have to mess with that file.
I recommend starting with the header.php. It’ll look the most familiar.
Depending on the theme you’re using, if you look in the folder wp-content/themes/ for a file called style.css, open it up and find the style for .header and set the background like this:
background: url(images/header.jpg) no-repeat;
where header.jpg is the image you want up there and it is placed in wp-content/themes/images/
You may have to adjust the width and height of the .header class to fit your image. If you want it to not be a background image, but one you can click on, to link to the home page for example, remove the above code, and open header.php and in the <div class=”header”.. area put the img in there in an <img src tag.
thanks for the help guys, and no the article was just confusing to me, but I think I have an idea where to start now. One other quick question, if I want to change the background, bgcolors, and widen the page itself, where would I start? Thanks again!
Well guys, that’s it, I give up!! After taking all your suggestions, and working for literally hours just to get a stupid header image to show up (and STILL it doesn’t), I am throwing in the towel. I could have coded the whole page in my Dreamweaver in the time I have wasted on this so far. It would have been nice, BUT, nothing is worth this much headache..thanks again for the help, too bad it didn’t :0)
Writing your own code is faster, besides making your code work with someone else’s. I can make a website template in a day but to take that same template and make a wordpress theme with it may take days or weeks to make everything perfect.
You guys are making mountains out of molehills. It’s a basic HTML layout, and you can plop the WP guts into it. When I design for WP, I create the basic structure, all the divs, etc. Then I section it off into header.php, index.php, sidebar.php and footer.php. Once that’s nailed down and validated, I work on fine tuning it. Depending on the complexity of the design and the functionality I want my theme to have, it can take anywhere from a few hours to a few days.
These tutorials should help tremendously:
And I saved the best for last, my friend, Shelly:
I never said it was hard…. i just said it takes time to make a good one you cant expect to make a great layout in a 2-3 hours
Okay, after reading the newest comments and checking out the tutorials, I am going to give it another shot…but the member above who said the instructions in the Codex were hard to follow was not kidding…however, the link the other’s friend Shelly, looks very promising, so I am going to follow it and hope for the best…wish me luck!!
Well, the DESIGN .. that can take eons, depending on whether I’m in a creative mood or not. But once I’ve got that design laid out, cutting it to WP (or Textpattern or sNews or Movable Type or whatever it may be), isn’t that difficult once you do a few. (It’s kind of like killing in that way; it gets easier the more you do it — not that I’d actually KNOW about that!)
I keep bare bones templates of WP, MT, TXP and sNews with all their styling hooks. That makes it easy to work with the CSS and ensures that I don’t leave something out. Does this make sense? Of course, I’ve been designing for WordPress for over four years now; and when I first started, I have to admit I had SOME trouble, but coming as I did from a Movable Type environment (where there were no less than five main templates, nine archive templates and scads of other bits that had to go into the design/layout), the fact that I could basically, if I wanted to, work only with one template (at the time, WP was laid out a bit differently than it is now, but even now, you can streamline it to a handful of templates, header.php, footer.php, sidebar.php and index.php and you’re done) was a BIG improvement over the headache that MT had become.
I’m glad you are not giving up, PurpleRose. Once you have your lightbulb moment, and you WILL if you’ve been designing for as long as you have, you’ll be amazed at what you can do with it and how flexible it is. Good luck with it!!!
Creating themes isn’t really that complicated once you understand what exactly is going on. Here’s the 2-cent tutorial:
First, create a directory for your theme, under wp-content/themes.
Second, create a style.css file. Inside this file, put the standard header. The most basic theme header is this one:
/* Theme Name: My Theme Name */
Third, create an index.php. This will be the guts of the main page.
Now, as far as that goes, you can stop right there. Those two files are all you need for a theme. Ideally, however, you want to section it up a bit. There’s lots of other theme templates you can create for specific parts of the site. The most common ones are header.php, footer.php, sidebar.php, comments.php, single.php, etc… In order to fully understand all these, you need to understand the Template Hierarchy.
When you request a webpage from a WordPress installation, it first decides what type of thing you’re asking for. If you want the main page, a single post, a category archive, whatever… Based on that information, it looks for specific filenames in your current theme, in a specific order. When it finds one of them, then that’s the one it calls and what generates your page. WordPress only calls one theme template (like single.php or index.php) per page request, so that template then can do things like get_header, get_footer, get_sidebar and so on to include other bits of the page. This allows you to build a logical separation between types of pages while keeping a similar look and feel throughout the whole site.
Remember, you’re not writing HTML here. You’re writing a bare page with PHP bits that will get filled in by content from inside the WordPress database.
Start with a style.css and an index.php. Examine the default theme’s index.php for an example. Make a header and footer and sidebar. Add on single.php and other page-specific bits as needed. To add them on, copy the index.php to those filenames and then modify them to change those specific pages. It’s easy, once you get used to it.
Great explanation Otto. I like to think of it as a sandwich. The header.php file is the top piece of bread, the footer.php file is the bottom piece of bread, the sidebar.php file is the slice of cheese and the index.php file is all the other stuff in the middle that makes it taste good. 😉 You just build your sandwich and enjoy. 🙂
- The topic ‘Ready to give up’ is closed to new replies.