问题
I'm building quite a large site, no e-commerce, but a a lot of specific content to be managed. For some reason, the client wants Wordpress. There is no way of getting around this...
I've used Wordpress before to rapidly develop blogs, but that's about it. If anything goes beyond the scope of Wordpress I'll use a framework in something (Rails/Cake).
This build is going to require custom plug-ins and widgets, so what I'm asking is how is the best way to go about learning how Wordpress and best practices for plug-ins and widgets?
回答1:
I use these on a daily basis and all the links are WordPress specific. Happy coding!
- Smashing Magazine
- Build Internet
- Dig WP
- CSS-Tricks
- WP Engineer
- Snipplr
- Paste Bin
- WordPress Support Forums
- WordPress Developer Documentation
- WordPress Plugin API
- WordPress Function Reference
- WordPress Filter/Hooks DB by Adam Brown
- WordPress PHPXref by Yoast
- WordPress StackExchange
回答2:
Hit up the wordpress site. Seems obvious, but they have lots and lots of good docs and information.
http://codex.wordpress.org/Developer_Documentation
回答3:
Start here http://codex.wordpress.org and dig deeper. I am currently using WordPress as a CMS and customizing it quite heavily. It is possible if you know the right hooks, how the templating works etc.
I also think the new API search interface is quite handy: http://wpdocs.labs.thedextrousweb.com/
回答4:
There is an absolutely awesome book (and e-book) called "Digging Into WordPress". Highly recommended. Solid advice, excellent descriptions and good code. They're really quite good at explaining things. If you buy a physical book you also get the PDF. The other nice thing is that if you buy it you get future updates as well, so that when WP goes through changes, you get the new versions of the PDF as it's updated.
You can find it at http://digwp.com/
回答5:
I am a big fan of css-tricks.com. Chris covers a lots of topics, including Wordpress stuff with some good screencasts too.
http://css-tricks.com/video-screencasts/
回答6:
Wordpress is a great platform but documentation is clearly not at the same quality level as traditional software editors.
All Wordpress Books are written by consultants which seems to be willing more to show off their technical knowledge with a bunch of hacks instead of being really pedagogical and take you step by step from the fundamental of architecture to the uppest level.
Wordpress could have been redevelopped with a standard MVC Framework I'm surprised nobody tried.
回答7:
Broadly speaking, there only one thing you need to learn to get started with writing plugins and such for WordPress, and that is how hooks work. Check out the functions "add_action" and "add_filter". Once you have that, the source code is your best friend. For the most part it's quite well commented. You figure out what you want to make happen, you identify the best "hook" to attach your code to, and then you use one of those two functions to insert your custom code into the mix.
That's basically how I started out. I learned about using hooks and joined the wp-hackers email list.
Here;s a good place to start: http://codex.wordpress.org/Plugin_API
回答8:
- http://codex.wordpress.org/Writing_a_Plugin
- http://codex.wordpress.org/Plugin_Resources
- http://codex.wordpress.org/Widgets_API
回答9:
Wordpress is great for editorial purpose , drafts, reviews , auto-save, new roles system and other stuff ... This is its domain , not other . Wordpress Plugins System doesn't forward OOP approach ( i don't say there aren't plugins written with OOP approach , but in a complex scenario hooks system result very tedious) First try to explain this to your customer . Documentation , like other developers explain , isn't suitable , you can try to start with http://codex.wordpress.org , then the best move is to analyze directly portion of wordpress code interested to your modify and find all filters/action hooks , this is a complete db of all hooks ( http://adambrown.info/p/wp_hooks ) . Finally pay attention to hooks that will become deprecated such as wp_authentication used in many plugins.
回答10:
If you are more used to Rails/Cake then present this as the more viable option to the client.
回答11:
i check smashingmagazine.com for tutorials, plugins, themes, tips, hacks
speckyboy.com is also a regular place i go to
usually it is more like google the task at hand and see ;)
the best way to learn, install a demo and play around or read a book along from wordpress ( the dummies series or something) that will make sure u cover all the basics and get some fun experience
Happy wordpressing
回答12:
OK a couple of things - think about changing your mind on WP, the new version (Not yet public) WP 3.0 goes a LOT further than any prev. version of WP. Link to WP 3.0 download You may find that this answers/solves a few more of your "custom" problems than you imagine. Beyond that writing widgets is not to hard. At the end of the day they all use the same WP - PHP class. Once you have that code (too long to post here I think?) you can manipulate the code at will. The hardest part I usually find - and you may also - is actually in the theme not in the backend. As clients usually attempt to "stuff" many plugins into their system. Big problem is that not all plugins are well written and some conflict. Sometimes "client" education on plugins is hard.
With regards to best practice - follow the WP guidelines, pretty simple, and remember to use wp_enqueue for your JS includes rather than hard code them into the head.
If you need any help/advice etc. feel free to shout
回答13:
WARNING: A little shameless self promotion here:
If you use TextMate I maintain a bundle specifically to help make working with WordPress easier. Check it out: http://top-frog.com/projects/wordpress-textmate-bundle/
If you're using BBEdit I've also got a simple function, action and filter clipping set: http://top-frog.com/projects/wordpress-clippings-for-bbedit/
On top of that, like others have said, check out the WordPress codex for getting started. If you go straight for WP 3.0 it'll be out of beta by the time you go live. Skip the download links and check it out straight over SVN while its still being developed: http://core.svn.wordpress.org/trunk
I've got my site running on 3.0b2 and my work site is on the same thing. Its a nice improvement and the custom-post-types feature goes a long way to making WordPress much nicer to work with as a CMS.
If you're looking for a theme framework check out Carrington: http://carringtontheme.com/ - starting with Carrington JAM (short for Just Add Markup) you get a really nice bare bones theme to start building on. Much better than Sandbox, IMHO. Carrington takes a little while to wrap your head around but once you do its quite nice and easy to extend. Very handy for complex sites.
Also keep an eye on:
http://markjaquith.wordpress.com/
http://josephscott.org/
来源:https://stackoverflow.com/questions/2817063/good-resources-for-wordpress