Jump to content

Confused About Learning Wordpress Template Functions


chaseman

Recommended Posts

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?

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.