chaseman Posted March 11, 2011 Share Posted March 11, 2011 I'm trying to build a wordpress template, I got the design ready and The Loop is working, but I'm quite confused about everything that goes beyond that. When I researched building wordpress templates everybody recommended the wordpress codex, but now that I'm looking at it I find it useless. First of all, the functions are not named the same way how they work in my templates, for example the function reference section in the documentation names a functions called get_the_content(), which does not work in my template instead the_content() works. To have a post preview I'd have to use the_exceprt() which is not even listed in the reference section. the_tags() is not listed either. So how am I supposed to learn all the functions if I can't rely on the documentation? Any ideas? Quote Link to comment Share on other sites More sharing options...
chaseman Posted March 11, 2011 Author Share Posted March 11, 2011 What I find interesting is, the documentation has a page called the_excerpt but that function is not listed in the function reference. ??? Quote Link to comment Share on other sites More sharing options...
ldb358 Posted March 13, 2011 Share Posted March 13, 2011 First off the wordpress codex is really good after you get more familiar with wordpress. As for the problem you described there, you need to get used to wordpress naming conventions. any function that is "get_the_*" returns the value where as "the_*" echos the value out. also i good way to see what a function does is to just type it into the search bar on the codex. Quote Link to comment Share on other sites More sharing options...
chaseman Posted March 13, 2011 Author Share Posted March 13, 2011 Thanks for your post, I simply started looking up the functions in the core code of wordpress itself. After getting more into template development i'm seeing things a bit clearer now, I've learned that it's best to use several resources at the same time, and not just rely on the codex. The codex is good for quickly checking the description or the description of the arguments, of course it's nothing like the PHP documentation. I've also learned that it's good to simply write your own functions if you want specific things. At first it all looked messy but now I'm able to navigate in this jungle. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.