WordPress Theme – wp_enqueue_script() and Conditional Tags
March 06th, 2009 | Author: Sunny
Conditional Tag:
Using Conditional Tags for testing whether a certain condition is met, and then returns either TRUE or FALSE.
For example,
is_home() will return TRUE if the main blog page is being displayed.
Some of the conditional tags may contain parameters for conditions. More information can be found here: http://codex.wordpress.org/Conditional_Tags
Function: wp_enqueue_script():
wp_enqueue_script(handle, src, deps, ver) is a function for adding Javascripts to a WordPress generated page. It accepts four parameters:
Usage: wp_enqueue_script(handle, src, deps, ver)
handle - (string) Name of the script. Lowercase string.
src - (string) (Optional) Path to the script from the root directory of WordPress. Default is false.
deps - (array) (Optional) Array of handles of any script that this script depends on; scripts that must be loaded before this script. Default is false.
ver - (string) (Optional) String specifying the script version number, if it has one. Defaults is false.
WordPress Theme – bloginfo() and include tags
March 05th, 2009 | Author: Sunny
I am learning Flex and iPhone programming right now, but since I have installed WordPress, so I have decided to learn about how to write WordPress Theme first. (Yea.. I just want to learn everything…)
This is my very first WordPress Theme. Very simple, and kinda modified from the default theme which comes with WordPress. I actually have hard time to understand the API and function references from WordPress when I was drafting it at the beginning, but it is kinda straight forward. It is not completely done, and I may just zip it here when it is completed in the future.
I am not going to write much detail here, but going to put some references here for myself for future development.
bloginfo() , get_bloginfo():
http://codex.wordpress.org/Template_Tags/get_bloginfo
get_header(), get_footer(), get_sidebar(), comments_template():
http://codex.wordpress.org/Include_Tags