Jump to content
SpikeTheLobster

PHP for WordPress

Recommended Posts

I spent an hour or so learning PHP yesterday evening, since I have a few projects I'd like to build, but I have yet to find a decent reference or tutorial for using it in WordPress - specifically revolving around custom fields, post types, creating taxonomies, custom forms, variables on user profiles and that kind of thing.

 

I'm just about to rush off again right now (dinner!), so I thought I'd ask if anyone's seen a decent site with this kind of information. Any pointers appreciated.

Share this post


Link to post
Share on other sites

The WP Codex is rather tough going, since it assumes a fair knowledge of several things - PHP, the way WP is built and so on. It's sort of like reading the dictionary to find a word definition - a great idea if you have the time, since you'll pick up a ton of other information, but not really something you want to do as soon as you've learned the language.

 

It's also very hard to "work through", since it lacks any proper learning structure. For example, I dived into the themes section (which is immediately after the total noob section about installing plugins and stuff) and got lost in minutes, because there's no real "basics" introduction to cover the essentials. It goes from "Click the install button" level to "WordPress can load different Templates for different query types. There are two ways to do this: as part of the built-in Template Hierarchy, and through the use of Conditional Tags within The Loop of a template file." - that's a pretty big jump.

 

I'm ideally looking for something between the two. Perhaps a "this is how I built a theme, step by step" sort of thing so I could see by example, then use the Codex to figure out the parts I'm missing.

 

As you know, I'm not a total noob (I just taught myself PHP in an hour, after all) - I don't need absolute basics but I do need some kind of foundation upon which I can build, rather than the "let's throw everything in together and let them work it out" approach the Codex frequently favours. :)

 

I'll have another search a bit later, I think, and see if I can turn up anything useful (that doesn't require buying nonsense ebooks!).

Edited by SpikeTheLobster

Share this post


Link to post
Share on other sites

I, honestly, have yet to completely understand WordPress's code completely. It switched me to PyroCMS so that I could actually understand and theme it.

 

But on topic: You will need quite good PHP knowledge to even begin to comprehend the WordPress source code. It's pretty wild.

Share this post


Link to post
Share on other sites

Not the source code - the stuff that's designed to be written and added to (themes, custom fields, taxonomies and so on). I don't want to understand the source code... that would be going a bit too far!!

Share this post


Link to post
Share on other sites

I think you will have a better luck if you search for what exactly you want to do. For instance, few years back I wanted to create my own Wordpress themes so I searched for Wordpress Theme tutorials and found some good sites that explained theme creation in detail. The WP Codex is more like a reference so unless you are somewhat familiar with the code and its structure, you won't be able to do much with it.

Share this post


Link to post
Share on other sites

I think you will have a better luck if you search for what exactly you want to do. For instance, few years back I wanted to create my own Wordpress themes so I searched for Wordpress Theme tutorials and found some good sites that explained theme creation in detail.

 

The problem is that no one's done what I want to do (or if they have, they're selling it, not giving it away in a tutorial).

 

The theme creation "tutorials" I've found so far have all gone only one step of the way: creating a generic theme. This is all very fine and good but it doesn't help with anything more than the very basic stuff, which I can figure out on my own, anyway. I'm still looking, of course, and if you have any good tutorial URLs I'd love to see them.

Edited by SpikeTheLobster

Share this post


Link to post
Share on other sites

I think I am going to join in this study so that I can benefit from any tips given here. Who knows I might even be able to learn something that I can share. Up to this point, though, I never had the urge to modify any Wordpress theme.

Share this post


Link to post
Share on other sites

The problem is that no one's done what I want to do (or if they have, they're selling it, not giving it away in a tutorial).

 

The theme creation "tutorials" I've found so far have all gone only one step of the way: creating a generic theme. This is all very fine and good but it doesn't help with anything more than the very basic stuff, which I can figure out on my own, anyway. I'm still looking, of course, and if you have any good tutorial URLs I'd love to see them.

 

Hi SpikeTheLobster,

 

Can you give an overview of what you are trying to implement?

 

Cheers,

Share this post


Link to post
Share on other sites

Can you give an overview of what you are trying to implement?

 

Not without giving away the site idea, no.

 

The essentials are covered in the question: custom fields, post types, creating/using taxonomies, custom forms, variables on user profiles (so I can calculate stuff like payments, account balances, etc.) and that kind of thing.

Edited by SpikeTheLobster

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×