According to my motto:
‘Knowledge is Knowing where it is Written’
by Albert Einstein
– I like to look up the core files of WordPress where the functions are defined.
What I quite often do when I come across something new or not fully understood – a function, or template tag, or whatever wordpress related:
I search the web for it; not just with any keywords, but quite focussed.
Lets take the example of one of my earlier posts (Front Page Comments on your WordPress Blog) where I was investigating why comments don’t easily show on the front page or on archive pages of a blog:
The function in the template files that would show comments and the comment form, is ‘comments_template()’ – I therefore search for:
the search engine of my choice returns (apart from many other links) first of all the link to the documentation in the codex; and a link to the core file (and the exact line):
Obviously, my search engine knows me, so the relevant results show quite at the top of all possible search results; you may need to scroll down a few pages to find the important link: the one beginning with ‘PHPXRef’.
the link to follow is:
in the page that opens, you’ll get the line:
defined at: followed by a link.
click on that link;
that leads you to:
with a list of some functions; click on the title of the one you are looking up.
in there in line 851, you have it (the code that explains why comments do not automatically show on the front page; and what you can do to make them show):
851 if ( !(is_single() || is_page() || $withcomments) || empty($post) )
This search method is also great for finding related functions, global wordpress variables, and expanding your vocabulary and understanding of wordpress terms…